-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Navigation by setting window.location does not trigger navigate event #27
Comments
Curious, I would have expected for the history API to update when this happens, but looks like we will need to patch the window & location globals to intercept this specific type of navigation. Makes sense if it doesn't change history at all before navigating. |
It is not possible to replace the Safari:
Chrome:
The way forward would be to document this restriction, there may be as well though another way to hook onto this functionality though (of navigating with Potentially a beforeunload would be a viable direction if it does capture the target href somehow. |
A list of limitations in the readme would be good. |
Prerequisites
Version (i.e. v2.x.x)
1.0.1-alpha.200
Node.js version (i.e. 18.x, or N/A)
v18.16.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10, or N/A)
Debian 12.5
Description
Setting window.location will not trigger a navigate event.
With the navigation api working on chrome, you can intercept page changes by window.location.
Using the navigation.navigate() method works fine. The README should list all differences. Implement window.location, or make it an option or list it as a limitation.
Steps to Reproduce
See example in https://github.com/aigan/virtualstate-navigation-bugs using the navigation buttons
Expected Behavior
Should work the same as in Chrome with the navigation api.
The text was updated successfully, but these errors were encountered: