You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the author of a React/Vue framework (Vike) I need to be able to programmatically invoke the browser's native behavior upon a text fragment #:~:text=, for example:
window.scrollTo('#:~:text=someText')
A workaround is location.hash = '#:~:text=someText' but it's error prone (e.g. leads to infinite loops when done in a popstate event) and pollutes the browser history.
I did a bunch of work on the spec in #225 that I hope makes this at least better defined. The example here is probably the easiest to parse. Per spec, I think the most straightforward would be to use replaceState if you don't want it to change history state.
That said, this doesn't currently work (in Chrome at least, haven't tried in other browsers) since I wasn't able to change Chrome's implementation to match the improved spec. Unfortunately I'm not working in this area anymore so am unable to do so in the foreseeable future.
As the author of a React/Vue framework (Vike) I need to be able to programmatically invoke the browser's native behavior upon a text fragment
#:~:text=
, for example:A workaround is
location.hash = '#:~:text=someText'
but it's error prone (e.g. leads to infinite loops when done in apopstate
event) and pollutes the browser history.Is that on the radar?
Related: vikejs/vike#2114.
The text was updated successfully, but these errors were encountered: