-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
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?