-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
What object is History associated with #2566
Comments
In Gecko history is in fact associated with the Window. It doesn't matter too hugely much in practice, because the History always represents the entire browsing context tree anyway, right? We could put it on the Document, but that's a bit weird given that the getter for it is on the Window... |
It seems to matter at least for navigating initial about:blank cross-origin. Handling that would require a complete revamp and complicate out-of-process child browsing contexts. |
I'm not sure I follow. Why does it matter there? In that case you get a new Document and you get a new Window, right? |
That wasn't clear to me. And doesn't seem to be defined although I'm probably missing something. (If it is defined, we should update the initial about:blank notes to point out that this only happens same-origin.) |
+1 to it wasn't clear to me. Indeed because most of my intuitive, top-of-the-mind understanding of that case is based on recalling non-normative notes. |
https://html.spec.whatwg.org/multipage/browsers.html#initialise-the-document-object step 3 says:
note that "has the same origin" check. |
And I certainly agree that finding that this is the relevant part of the spec is not simple, by the way! I am in no way averse to making this stuff clearer somehow... |
In addition to making the spec clearer, it might be a good idea to add another test case to https://github.com/w3c/web-platform-tests/blob/master/common/object-association.js for cross-origin navigation (that tests that the object does change). |
@domenic you can only observe it changes with |
Any progress on this. Should it be changed in https://html.spec.whatwg.org/multipage/history.html#the-session-history-of-browsing-contexts into something like:
|
This is done by expanding the object-association.js helper and using it. See whatwg/html#2566.
This is done by expanding the object-association.js helper and using it. We can also remove an outdated workaround in that file for extra load events, since no modern browsers suffer from that. See whatwg/html#2566.
…ument, not Window, a=testonly Automatic update from web-platform-tests Test that History is associated with Document, not Window This is done by expanding the object-association.js helper and using it. We can also remove an outdated workaround in that file for extra load events, since no modern browsers suffer from that. See whatwg/html#2566. -- wpt-commits: 09427933ac4883cb6cbe756eaa9c980eb8b76b1d wpt-pr: 36367
…ument, not Window, a=testonly Automatic update from web-platform-tests Test that History is associated with Document, not Window This is done by expanding the object-association.js helper and using it. We can also remove an outdated workaround in that file for extra load events, since no modern browsers suffer from that. See whatwg/html#2566. -- wpt-commits: 09427933ac4883cb6cbe756eaa9c980eb8b76b1d wpt-pr: 36367
HTML says Document, but #2545 (comment) suggests Window, at least in Firefox (other browsers seem impossible to test). @bzbarsky?
The text was updated successfully, but these errors were encountered: