Re: [whatwg/dom] Proposal: a DocumentFragment whose nodes do not get removed once inserted (#736)

WebReflection left a comment (whatwg/dom#736)

@FrameMuse the summary is here https://github.com/whatwg/dom/issues/736#issuecomment-2481544529 ... we need a `#shadow-root` like node for persistent fragments that:

  * does not affect CSS selectors, so that `nth-child` works ignoring those nodes (differently from SD)
  * does not affect `childNodes` or `children` as it's meant to be transparent (differently from SD)
  * boundaries cannot be queried or removed by libraries
  * libraries can still grab inner nodes and move these elsewhere, TBD what happens once you move again the persistent fragment ... did it lose its content? should it carry it around?
  * does not infer with events bubbling (or capturing) ... (differently from SD)

It's going to be a whole new beast that would require a lot of internals hacking to get it right, it's way easier to ignore it's needed by all means and solved by user-land anyway ... so this is the current state, in few words.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/736#issuecomment-2710766384
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/736/2710766384@github.com>

Received on Monday, 10 March 2025 14:20:23 UTC