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

@eyeinsky apologies for the late reply, I have missed these questions, somehow. To me, the behavior is the one provided by the polyfill, meaning that:

  * it doesn't have to be continuous, and in the poly, if you don't have the fragment reference, you can't pollute its related list of child nodes
  * being able to append all at once a list of LI, DT, OPTIONS, TRs grouped somehow and dropped, or moved, with ease, is another case ... but what libraries do, is a way to pollute specific pinned points in a tree with multiple nodes and be able, when these change, to drop all those nodes at once, without loosing references of some 3rd party does obtrusive operations
  * there's no strict reason to add a new node type, but then it's impossible for libraries to know if a fragment is a persistent one or not, hence these cannot know AOT if appending such fragment will make it possible to remove it later on

This proposal tackle a very specific need for libraries that do diffing, either vDOM or directly live on the DOM, without needing [3rd party](https://github.com/WebReflection/uwire/) helpers (that's just an example, many libraries authors confirmed they need what my polyfill provides).

About the last question: the polyfill shows what's meant. The persistent fragment is not live, or should never be discoverable live as a node, so its childNodes will have regular parentNode, like it is for regular fragments, but it's possible to move, or remove, persistent fragments.

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

Received on Tuesday, 6 July 2021 07:01:10 UTC