← Back to context

Comment by kkarpkkarp

14 hours ago

I am puzzled then: so what would happen if the template will replace this island form your example with markup without closing `</em>`?

  <p>
    <em>Some replaced text
  </p>

Which, by the HTML standard, will automatically close the `</em>` as the `</p>` closes.

  • It would be pretty wild if this feature allowed you to go back and add/remove individual tokens from earlier in the document and re-apply all the tree construction rules, like an even more unhinged version of document.write(). I think the actual proposal is expressed in terms of moving DOM nodes around and doesn't allow stuff like this.

    • It's expressed in terms of changing the output of where bides are inserted. Instead of new nodes being inserted to the template elements, they are inserted where the processing instructions were found.