Re: [whatwg/dom] Should attachShadow throw or override when an existing declarative shadow root doesn't match? (Issue #1235)

I was getting started thinking about this change, and another case comes up. What should happen here?

```html
<div>
  <template shadowrootmode=open>Root 1</template>
  <template shadowrootmode=closed>Root 2</template>
</div>
```

In current behavior and spec, there will be an `open` shadow root attached which contains "Root 2", because the "attach a shadow root" algorithm will clear out the first (open) root and insert "Root 2". We can't throw in the parser. Should this just be the console warning case?

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

Message ID: <whatwg/dom/issues/1235/1883909734@github.com>

Received on Tuesday, 9 January 2024 22:37:14 UTC