Skip to content

What object is History associated with #2566

Closed

Description

@annevk

HTML says Document, but #2545 (comment) suggests Window, at least in Firefox (other browsers seem impossible to test). @bzbarsky?

Activity

  1. bzbarsky commented on Apr 20, 2017

    @bzbarsky
    Contributor

    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...

  2. annevk commented on May 8, 2017

    @annevk
    MemberAuthor

    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.

  3. bzbarsky commented on May 8, 2017

    @bzbarsky
    Contributor

    It seems to matter at least for navigating initial about:blank cross-origin.

    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?

  4. annevk commented on May 8, 2017

    @annevk
    MemberAuthor

    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.)

  5. domenic commented on May 8, 2017

    @domenic
    Member

    +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.

  6. bzbarsky commented on May 8, 2017

    @bzbarsky
    Contributor

    And doesn't seem to be defined although I'm probably missing something.

    https://html.spec.whatwg.org/multipage/browsers.html#initialise-the-document-object step 3 says:

    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

    note that "has the same origin" check.

  7. bzbarsky commented on May 8, 2017

    @bzbarsky
    Contributor

    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...

  8. domenic commented on May 8, 2017

    @domenic
    Member

    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).

  9. annevk commented on May 9, 2017

    @annevk
    MemberAuthor

    @domenic you can only observe it changes with Location, but that might be enough to be worth it.

  10. croraf commented on Dec 9, 2020

    @croraf

    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:

    the window is associated with a unique History object.

  11. added a commit that references this issue on Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interopImplementations are not interoperable with each othertopic: history

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions