Don't emit "domContentLoaded" and "load" events when creating new top-level browsing contexts (tabs) when "about:blank" is loaded and emit contextCreated event at the end
Categories
(Remote Protocol :: WebDriver BiDi, task, P2)
Tracking
(Not tracked)
People
(Reporter: Sasha, Assigned: Sasha)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [webdriver:m20])
After reading the html spec on the topic of creating a top-level browsing context with about:blank, I've noticed that in the browsing context creation algorithm we’re supposed to create and load a document, but it looks like it skips all the post parsing steps, where we’re supposed to send browsingContext.domContentLoaded and browsingContext.load events, and just jumps to the end of it (to the step 11). So it looks like per spec we shouldn’t send the load events. At the same time, it seems like we should send the browsingContext.contextCreated event almost at the end (see step 12) before we return.
According to Alex, if we don't send load events but send the contextCreated event when a tab is fully loaded, that should be enough for Puppeteer. But at the moment of this bug creation, Chrome sends the load events for such case and send browsingContext.contextCreated events very early (before load events).
| Assignee | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Moving it already to M14 as discussed yesterday in the meeting.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•10 months ago
|
Updated•10 months ago
|
| Assignee | ||
Comment 3•10 months ago
|
||
Looks like since I've created this bug, Chrome updated their implementation, and they do not emit load events for "about:blank" anymore. But since there are no really requests to fix it now, I think it still makes sense to wait for bug 543435 to land before working on this bug.
Comment 5•7 months ago
|
||
Note that we currently send the load events for browsing contexts created with browsingContext.create and window.open("about:blank") but not for those created with window.open().
Comment 6•5 months ago
|
||
Holger, mind testing again now that the about:blank load is happening synchronously?
Comment 7•5 months ago
|
||
(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #6)
Holger, mind testing again now that the about:blank load is happening synchronously?
Firefox now always sends the load events for new browsing contexts (including those opened with window.open() which didn't get load events previously).
Updated•3 months ago
|
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Updated•15 days ago
|
Description
•