Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the default pathname is '/' #515

Closed
Mas0nShi opened this issue Jun 24, 2022 · 0 comments · Fixed by #516
Closed

the default pathname is '/' #515

Mas0nShi opened this issue Jun 24, 2022 · 0 comments · Fixed by #516

Comments

@Mas0nShi
Copy link
Contributor

Mas0nShi commented Jun 24, 2022

Associate with #508

const { Window } = require('../packages/happy-dom');
const window = new Window();

const url = 'https://www.example.com';
const u = new window.URL(url);
console.log(u.pathname);
// happy-dom: ''
// browers: '/'
Mas0nShi added a commit to Mas0nShi/happy-dom that referenced this issue Jun 24, 2022
capricorn86 added a commit that referenced this issue Jun 28, 2022
#515@patch: Fixes default pathname when parse URL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant