Skip to content

Sync navigation to a fragment identifier is probably not compatible with out-of-process iframes #3497

@bzbarsky

Description

@bzbarsky

Consider code like this:

frames[0].location.hash = "foo";
postMessage("parent", "*");

where the child has an event listener for one of the many events that https://html.spec.whatwg.org/multipage/browsing-the-web.html#traverse-the-history fires synchronously (focus, blur, popstate, hashchange, at the very least) and the event listener calls parent.postMessage("child", "*"). I believe current spec requires the "child" message to be delivered before the "parent" message in this situation. This is rather complicated if the parent and child are in different processes.

A possible fix would be to keep the sync behavior only when the thing doing the navigation and the thing being navigated are in the same unit of similar-origin related browsing contexts or something.

@domenic how does Chrome handle this with out-of-process iframes enabled?

/cc @annevk @jgraham @mystor @smaug----

Metadata

Metadata

Assignees

No one assigned

    Labels

    interopImplementations are not interoperable with each othernormative changetopic: agentThe interaction with JavaScript's agent and agent cluster conceptstopic: navigation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions