Description
As far as I can tell the "unit of related browsing contexts" idea is broken. E.g., if a top-level opens two auxiliary browsing contexts, and all contain same-origin documents, and then the top-level closes itself or gets closed, the two auxiliary browsing contexts might not have a reference to each other's WindowProxy
, but definitely need to remain tied as their documents need to be in the same agent cluster. However, per the current definition they'd suddenly no longer be in the same unit.
Therefore, I think we need a browsing context group, which holds a set of top-level/auxiliary browsing contexts and also a map of site to agent clusters.
cc @mystor
(Note: "units of related similar-origin browsing contexts" is also broken, as a browsing context can hold many origins.)