-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
updateQueryString() (or session$updateQueryString) ultimately calls window.history.replaceState() or window.history.pushState(). However, when using shinylive the app is served as an iframe, so window in this case refers to the iframe, not the parent window. Therefore, neither of these calls works and updateQueryString() does nothing. I've found the following works instead:
shinyjs::runjs(paste0("window.parent.history.pushState(null, null, '", pushQueryString, "')"))The MDN docs state that "If a window does not have a parent, its parent property is a reference to itself." Therefore. changing the typescript code to just use window.parent instead of window should fix this problem, regardless of whether you are using shinylive or not.
Metadata
Metadata
Assignees
Labels
No labels