Open juliandescottes opened 4 months ago
CC @OrKoN and @sadym-chromium
The Browser Testing and Tools Working Group just discussed Support for unloaded tabs
.
@jgraham would you mind to raise the issue against the HTML spec to support unloaded tabs? Thanks.
As seen on https://bugzilla.mozilla.org/show_bug.cgi?id=1876240, some BiDi commands are not behaving correctly on Firefox when the browser has unloaded tabs.
On Firefox, we have unloaded tabs for instance when doing a session restore. Some tabs will be added in the background but they won't have any browsing context attached yet. It will typically only be created when the tab becomes selected. I think Chrome has a similar concept, but I don't know the implementation details.
At least on Firefox, such tabs don't have a document or browsing context attached yet, so a lot of our commands and events don't work properly. For instance, no browsingContext.contextCreated event will be emitted, browsingContext.navigate will fail etc...
How should we handle such tabs in BiDi, provided the concept is similar enough in all browsers?
An option would be to ignore those tabs until they are loaded: never return them from browsingContext.getTree, do not emit event for them etc...