-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Mention sessionStorage
copying in logic for creating auxiliary browsing contexts
#2681
Comments
Another note: when opening a new window with This is currently the behavior in both Chrome and Firefox (haven't tested any other browsers). |
Also cc-ing @bzbarsky re the second comment above, as he probably has thoughts. |
cc @mikewest |
Ideally we wouldn't copy sessionStorage for the noopener case, yes. Not sure about the noreferrer case; again ideally it would work that way but webcompat is worrisome. |
This was discussed in whatwg#2681. Tests: https://bugzilla.mozilla.org/show_bug.cgi?id=1372662 Also fixes whatwg#2681's original issue by relocating the copying logic to the place where new browsing contexts are actually created, instead of it being located in the session storage portions of the spec.
When opening a new auxiliary browsing context,
SessionStorage
defines its behavior (that theStorage
object is copied, but not shared with, the new toplevel window) here: https://html.spec.whatwg.org/multipage/webstorage.html#the-sessionstorage-attributeThis is not mentioned in the logic flow for creating a new auxiliary browsing context, for example, in the named window resolution logic here: https://html.spec.whatwg.org/multipage/browsers.html#noopener. This creates some spooky action-at-a-distance where
sessionStorage
logic must be run in this codepath but is not mentioned.This should be refactored so that the
sessionStorage
behavior is mentioned when creating a new auxiliary browsing context (probably here: https://html.spec.whatwg.org/multipage/browsers.html#creating-a-new-browsing-context).cc @annevk
The text was updated successfully, but these errors were encountered: