-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Should history.state object be extended rather than overridden? #3006
Closed
ksurakka opened this issue
Oct 22, 2019
· 0 comments
· Fixed by WFCD/warframe-hub#411, MichaelKohler/reps-voting-analysis#20, OpenTMI/opentmi-default-gui#29, LuisAlejandro/luisalejandro.github.io-legacy#82 or noprotocol/Bubblicious#10
Closed
Should history.state object be extended rather than overridden? #3006
ksurakka opened this issue
Oct 22, 2019
· 0 comments
· Fixed by WFCD/warframe-hub#411, MichaelKohler/reps-voting-analysis#20, OpenTMI/opentmi-default-gui#29, LuisAlejandro/luisalejandro.github.io-legacy#82 or noprotocol/Bubblicious#10
Labels
Comments
This was referenced Mar 1, 2020
This was referenced Mar 19, 2020
This was referenced Mar 28, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What problem does this feature solve?
It makes it possible for other libraries to store and use information from history.state objects as they would not been overridden by vue-router.
I encountered this when I was trying to build a bookmarking feature. I was able to use keys provided by vue-router for this, but I was just thinking that overriding may cause hard-to-find problems in some environments and also because this overriding could be easy to replace by extending.
I mean these two lines in the codebase:
vue-router/src/util/push-state.js
Line 31 in 638278b
vue-router/src/util/push-state.js
Line 33 in 638278b
Using e.g.:
history.replaceState( {...history.state, ... { key: getStateKey() }}, '', url)
could cause less harm. Of course the key attribute would be still overridden.
What does the proposed API look like?
There are no API changes
The text was updated successfully, but these errors were encountered: