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

Add support for URL object instance in History.pushState() and History.replaceState() #1621

Open
sohailalam2 opened this issue Nov 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sohailalam2
Copy link

Describe the bug

History.pushState(state, title, url) and History.replaceState(state, title, url) APIs technically accepts a string or an URL object as the last parameter.

However, while passing URL object, happy-dom throws an exception because of the string comparison methods being used in BrowserFrameURL.getRelativeURL() # line 18

To Reproduce
As described above ☝️

Expected behavior
History APIs should allow for an URL object.

Screenshots
NA

Device:

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context

@sohailalam2 sohailalam2 added the bug Something isn't working label Nov 23, 2024
sohailalam2 pushed a commit to sohailalam2/happy-dom that referenced this issue Nov 23, 2024
…ect in History.pushState() and History.replaceState() APIs
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

1 participant