Open sadym-chromium opened 2 months ago
We can mark those tests as tentative for now: https://github.com/web-platform-tests/wpt/pull/47958
We cannot simply ignore all the navigations to about:blank
(as proposed above) given that such a navigation can happen at any time by a test as well, which then has nothing to do with the initial navigation when the tab gets created.
But yes, we should discuss and maybe you can add it to the next meeting which probably will be the TPAC one this month?
We cannot simply ignore all the navigations to
about:blank
(as proposed above)
Let me clarify: about:blank
can be a valid navigation, and I don't propose ignoring all the about:blank
navigations. This issue is regarding only the initial navigation when the browsing context is created.
I think in principle I'm happy with the idea of trying to ignore the navigation to initial about:blank
so that from the user point of view it's an atomic part of the navigable being created. So no events relating to the load of that document, maybe also delaying the context created event until after it's loaded, and preventing any commands running in a context while any initial about:blank has not completed loading.
However the technical here are tricky, and I haven't looked in great detail.
Does the spec actually go through the navigation started hook when creating a new browsing context? I do not seem to be able to confirm that.
Note that this issue also affects the browsingContext.contextCreated
event. If emitted too early, clients may assume the tab is ready for interaction and begin sending commands, leading to potential errors like this one.
Which events should we actually emit, and when, during the browsingContext.create
command? Here's a proposal:
browsingContext.contextCreated
, script.realmCreated
, and potentially others until the initial load is complete.Is there anything else we should consider to ensure a smooth and error-free interaction? What are your thoughts on this approach?
The Browser Testing and Tools Working Group just discussed Emitting Events During "browsingContext.create" when "about:blank" is loaded
, and agreed to the following:
ACTION: sadym to update test to hsow that events are not emited on about:blank
Note that we are going to update the behavior of Firefox over on https://bugzilla.mozilla.org/show_bug.cgi?id=1922014.
@sadym-chromium can you please update the related tests so that they actually behave as expected? Thanks.
@sadym-chromium can you please update the related tests so that they actually behave as expected? Thanks.
I started working on it in https://github.com/web-platform-tests/wpt/pull/48651
Analogous to the initial
browsingContext.load
event, it can be confusing, especially if the browsing context is created, navigated toabout:blank
and then navigated to some other URL.From discussion:
Do we need those events for the initial navigation? If not, should we specify an exception?