Re: [WICG/webcomponents] [scoped-registries] Finding a definition for disconnected elements (Issue #1040)

The reason why the proposal doesn't have elements remember their registry is because the Chrome DOM team at the time was very reluctant to adding another reference to all elements to point to the registry due to memory concerns. That changed the design to dynamically looking up the registry by using the element's current root node if the root node is a ShadowRoot.

Maybe there's a pattern where only root node elements created within a scope need to store their registry, and all other elements don't store a registry. I'm not sure if most DOM implementations put some references into a dynamic map (I think Blink calls this "rare data" maybe?), but that could reduce the memory overhead.

Thoughts @mfreed7 @rniwa?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1040#issuecomment-1847654039
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1040/1847654039@github.com>

Received on Friday, 8 December 2023 18:40:21 UTC