diff --git a/dom.bs b/dom.bs index 182f246d..80a7c85b 100644 --- a/dom.bs +++ b/dom.bs @@ -4502,6 +4502,8 @@ dom-Range-extractContents, dom-Range-cloneContents --> clonable is true:
Assert: copy is not a shadow host. +
Run attach a shadow root with copy, node's shadow root's mode, true, node's shadow root's delegates focus, and node's @@ -6929,7 +6931,7 @@ are:
To attach a shadow root, given an element element, a string mode, a boolean clonable, -a boolean delegatesFocus, and a boolean slotAssignment: +a boolean delegatesFocus, and a string slotAssignment:
If element's namespace is not the HTML namespace, @@ -6958,24 +6960,30 @@ a boolean delegatesFocus, and a boolean slotAssignment:
If element is a shadow host, then:
If element's shadow root's declarative - is false, then throw an "{{NotSupportedError!!exception}}" {{DOMException}}. +
Let currentShadowRoot be element's shadow root. + +
If any of the following are true: + +
currentShadowRoot's declarative is false; or + +
currentShadowRoot's mode is not mode, +
then throw a "{{NotSupportedError!!exception}}" {{DOMException}}.
Otherwise:
Remove all of element's shadow root's - children, in tree order. +
Remove all of currentShadowRoot's children, in + tree order. -
Set element's shadow root's - declarative to false. +
Set currentShadowRoot's declarative to false.
Return.
This means that if multiple declarative shadow roots are contained within a single - shadow host, only the last one will remain.
Let shadow be a new shadow root whose node document