- From: Andrea Giammarchi <notifications@github.com>
- Date: Fri, 15 Nov 2024 04:48:57 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/issues/736/2478740570@github.com>
@thoughtsunificator my latest idea is that a fragment ownership that transparently operates with its nodes could be a great deal/compromise: * it works already anywhere a fragment works * it owns its node .. no reference to that fragment? (and no leak in the live dom) you can mess up with its nodes but if the fragment is moved or it operates within these nodes expect breaking things as you should not operate on nodes you don't own * a fragment can be still part of a list of known nodes, even if it's never technically live ... this helps and simplifies diffing logic in pretty much all libraries that would like to define a fragment as component * you can always move the fragment elsewhere and its owned nodes will follow it in place From implementation perspective it's all about adding an extra `ownerFragment` property and check for PersistentFragment kind on node operations. I don't know how bad of a performance impact that could be but to me it doesn't seem too big of an issue and also the logic could be initialized lazily (i.e. only when and if a PersistentFragment is iniitialized) so the perf impact on yesterday and today code would be zero. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/736#issuecomment-2478740570 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/736/2478740570@github.com>
Received on Friday, 15 November 2024 12:49:01 UTC