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 ](https://html.spec.whatwg.org/#creating-a-new-browsing-context) we’re supposed to create and load a document, but it looks like it skips all [the post parsing steps](https://html.spec.whatwg.org/#stop-parsing), 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](https://html.spec.whatwg.org/#creating-a-new-top-level-traversable)) 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.
Bug 1930594 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
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 ](https://html.spec.whatwg.org/#creating-a-new-browsing-context) we’re supposed to create and load a document, but it looks like it skips all [the post parsing steps](https://html.spec.whatwg.org/#stop-parsing), 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](https://html.spec.whatwg.org/#creating-a-new-top-level-traversable)) 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).