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

error in method getAbsoluteURL #514

Closed
Tracked by #520
Mas0nShi opened this issue Jun 24, 2022 · 1 comment
Closed
Tracked by #520

error in method getAbsoluteURL #514

Mas0nShi opened this issue Jun 24, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Mas0nShi
Copy link
Contributor

Mas0nShi commented Jun 24, 2022

Associate with #508

I think this test unit is wrong, so the implementation is wrong too.

https://github.com/capricorn86/happy-dom/blob/f9d55eb1f31ee6538935d27c5173be5db11516f8/packages/happy-dom/test/location/RelativeURL.test.ts

why?

in order to load the web assets in ResourceFetchHandler.fetchSync correctly, we used RelativeURL.getAbsolteURL.
but it's seems wrong!

e.g.
we have tags <link rel="stylesheet" href="/static/jquery.css" type="text/css" /> in http://localhost/tree/
the correct way is http://localhost/static/jquery.css
but it's http://localhost/tree/static/jquery.css now.

@Mas0nShi
Copy link
Contributor Author

Mas0nShi commented Jun 24, 2022

An imperfect solution.

Mas0nShi@3e67605

we use native module url fix it #521

Mas0nShi added a commit to Mas0nShi/happy-dom that referenced this issue Jun 26, 2022
@capricorn86 capricorn86 added the bug Something isn't working label Jul 1, 2022
@Mas0nShi Mas0nShi closed this as completed Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants