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

FrameMuse left a comment (whatwg/dom#736)

@AlbertMarashi 

> We'd often use fragment nodes for things like conditional rendering logic inside of frameworks, and being able to send these nodes as parseable HTML content (eg: <#> and </#>) to the browser so that they can be later be used for mounting instead of comments.

I think adding a name so that `NodeGroup` can be displayed e.g. as `<#SomeName></#Somename>` should solve the problem. However, I'm not sure if it makes sense since it would infer that you can attach attributes to the `NodeGroup`, which should NOT be allowed IMO.

And also I think comments are ok for this purpose since I don't see any advantage from having this vs having comments - you would still need to figure out finding and replacing logic. It only makes sense if you want to hydrate after the html was parsed in the browser, so that you can probably query those groups and replace with continuous data (from streaming or client itself).

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

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

Received on Monday, 24 March 2025 17:00:28 UTC