[whatwg/dom] Enforce same parameters for attachShadow on declarative shadow root (PR #1246)

Per the discussion at https://github.com/whatwg/dom/issues/1235, this PR changes the behavior when calling `attachShadow()` on a node with an existing declarative shadow root. Now, if the parameters do not match between the arguments to `attachShadow()` and the existing root, throw an exception. Prior behavior was to silently return the declarative root as-is, with mismatched parameters.

See also, https://github.com/whatwg/html/pull/10069.

@emilio @annevk @rniwa
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/dom/pull/1246

-- Commit Summary --

  * Just assert that a cloned node is not a shadow host
  * Enforce same parameters for attachShadow on declarative shadow root

-- File Changes --

    M dom.bs (12)

-- Patch Links --

https://github.com/whatwg/dom/pull/1246.patch
https://github.com/whatwg/dom/pull/1246.diff

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

Message ID: <whatwg/dom/pull/1246@github.com>

Received on Tuesday, 16 January 2024 21:56:14 UTC