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
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.
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.
If browsingContext's only entry in its session history is the about:blank Document that was added when browsingContext was created, and navigation is occurring with replacement enabled, and that Document has the same origin as the new Document
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...
Activity
bzbarsky commentedon Apr 20, 2017
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...
annevk commentedon May 8, 2017
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.
bzbarsky commentedon May 8, 2017
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?
annevk commentedon May 8, 2017
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.)
domenic commentedon May 8, 2017
+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.
bzbarsky commentedon May 8, 2017
https://html.spec.whatwg.org/multipage/browsers.html#initialise-the-document-object step 3 says:
note that "has the same origin" check.
bzbarsky commentedon May 8, 2017
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...
domenic commentedon May 8, 2017
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).
annevk commentedon May 9, 2017
@domenic you can only observe it changes with
Location, but that might be enough to be worth it.croraf commentedon Dec 9, 2020
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:
Test that History is associated with Document, not Window
Test that History is associated with Document, not Window
Bug 1794375 [wpt PR 36367] - Test that History is associated with Doc…
Bug 1794375 [wpt PR 36367] - Test that History is associated with Doc…
Bug 1794375 [wpt PR 36367] - Test that History is associated with Doc…