- From: Ryosuke Niwa <notifications@github.com>
- Date: Thu, 21 Nov 2024 03:59:49 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 21 November 2024 11:59:53 UTC
Okay, so I think I understand @sorvell's proposal. An element is associated with the registry of a shadow tree to which it last belonged. To put it another way, every time an element is inserted into a shadow tree, its associated registry changes to the registry of that shadow root. @annevk and I discussed an alternative approach, which is to permanently associate each element with the registry from which it was created. Previously, we thought this will incur extra pointer per element and therefore not permissible in terms of memory cost. But we can mostly avoid this cost if the common scenarios involve all nodes in a given shadow tree sharing the same registry. In that scenario, we can continue to associate the shared registry with its `ShadowRoot`/`Document`. Whenever an element has a registry that is distinct from this shared registry, we need to set a bit flag on the node indicating that the element is in this state, and then we just need a side table mapping each such element to its registry. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1040#issuecomment-2490939554 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1040/2490939554@github.com>
Received on Thursday, 21 November 2024 11:59:53 UTC