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

FrameMuse left a comment (whatwg/dom#736)

@WebReflection 

```js
class NodeGroupBoundary extends Comment {
  // made up for idea sharing purpose
  [Symbol.serialized]() {
    // transparent when parent `innerHTML` or `outerHTML`
    // happens if anonymous
    return this.data.length ? `<!--${this.data}-->` : '';
  }
}
```

This somewhat remembers me about what I proposed in https://github.com/WebReflection/group-nodes/discussions/4#discussioncomment-12722599, where I mentioned "Custom Node Serialization", do we already have this proposed somewhere? Should we make a real proposal to allow nodes/elements to have custom serialization?

For some reason I feel like it could also positively impact DOMParts proposal.

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

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

Received on Friday, 18 April 2025 12:08:16 UTC