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

WebReflection left a comment (whatwg/dom#736)

> Btw, I just wanted to say `<li>`, `<option>`, `<title>`, and more are not effected. `<td>` `<tr>` also not effected in DOM.

what do you mean?

if I write this content (and we should keep in mind *hydration* is part of this story) I have all sort of unexpected things on the living DOM:

```html
<!doctype html>
<html lang="en">
  <head>
    <group>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </group>
    <group><title>shenanigans</title></group>
  </head>
  <body>
    <ul>
      <li>1</li>
      <group><li>2</li></group>
      <li>3</li>
    </ul>
    <select>
      <option>1</option>
      <group><option>2</option></group>
      <option>3</option>
    </select>
    <table>
      <tr>
        <td>1</td>
        <group><td>2</td></group>
        <td>3</td>
      </tr>
    </table>
  </body>
</html>
```

Result as image:

![Image](https://github.com/user-attachments/assets/db09ec10-0a98-44ae-baf1-52fa1ad6f0b1)

To sum it up:

  * `<head>` stuff is moved outside
  * the table erases entirely the `<group>` node
  * *devtools* shows errors for both the `<ul>` and the `<select>`

but most importantly, somebody complained about the tree being unexpected when having a wrapper node makes everything even more unexpected from tree walking perspective ... and then again, I would be all up for a "*transparent node*" that works as *nodegroup* container without breaking/moving/shifting elements while parsing to fix the unexpected but that seems like changing everything the DOM knows to date so I doubt it's a viable solution unless we want to wait years before having something usable ... wouldn't you agree?


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

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

Received on Thursday, 24 April 2025 11:17:40 UTC