- From: Andrea Giammarchi <notifications@github.com>
- Date: Wed, 16 Apr 2025 03:16:56 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/issues/736/2809099912@github.com>
WebReflection left a comment (whatwg/dom#736) forgot to answer this: > I think that ideally, if this thing is a Node at all, we really would want a very element-type node that lives in the tree - elements have nearly all of the qualities we want except for wrt CSS. in previous discussions I'd be OK with this too as long as these elements can be appended without breaking the layout (so it's a hard sell and much more work for very little gain?): * `<li>` ... these cannot be appended within an outer element * `<head>` related children that could be grouped by feature-detection/UA sniffing (as ugly as that is, it's still very much used out there) * `<td>` or `<tr>` cannot be appended without breaking tables * `<option>` cannot be appended * `<source>` or other strictly constrained by their parent (and vice-versa) that cannot be everywhere If we take `<script>` or even `<noscript>` as examples these can be everywhere, just like comments, but AFAIK cannot be inside `<tbody>` or `<ul>` without breaking the layout so this transparent node will be that new thing that requires a lot of changes for various primitives + having a container that special that bypasses CSS rules (hence `querySelector` too?) feels like a lot to ask, while having exactly the DOM as we all know it and just a new primitive like NodeGroup feels like the easiest way to go and avoid feature-creep scenarios. As summary: in an ideal world where everything could change having a "*transparent*" container would be cool but the double `parentNode` dance to know if a node is live or confined in it would still be awkward, selectors not interfering would be awkward, and if the check for *isConnected* is through such element `parentNode` (either `null` or something else) then it's exactly the same as proposed in NodeGroup so maybe we don't need that extra complexity? -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/736#issuecomment-2809099912 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/736/2809099912@github.com>
Received on Wednesday, 16 April 2025 10:17:00 UTC