[whatwg/dom] Element.attachShadow should set the declarative flag to false of an existing declarative shadow dom. (Issue #1234)

### What is the issue with the DOM Standard?

That matches the current implementations, and makes sense.

https://dom.spec.whatwg.org/#concept-attach-a-shadow-root doesn't change the declarative flag if you hit the branch in step 4, and https://dom.spec.whatwg.org/#dom-element-attachshadow doesn't override the declarative flag to false either.

That means that, per spec, if you `.attachShadow()` on a node with a declarative Shadow DOM, calling `.attachShadow()` again will keep working and keep returning the same node over and over.

cc @mfreed7 @rniwa @annevk @avandolder

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

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

Received on Sunday, 26 November 2023 21:53:43 UTC