From 191a88c92e1f80a7bb439b064a63fbd043204226 Mon Sep 17 00:00:00 2001
From: Mason Freed Let shadow be shadow host's shadow root.
+ Let shadow be this's shadow root.
If shadow is null or its mode is "
-
closed
",
then return null.
If this's namespace is not the HTML namespace, +
If shadow host's namespace is not the HTML namespace, then throw a "{{NotSupportedError!!exception}}" {{DOMException}}. -
If this's local name is not a +
If shadow host's local name is not a
If this's local name is a valid custom element name, or
- this's is
value is not null, then:
+
If shadow host's local name is a valid custom element name, or
+ shadow host's is
value is not null, then:
Let definition be the result of
looking up a custom element definition given
- this's node document, its namespace, its
+ shadow host's node document, its namespace, its
local name, and its is
value.
If definition is not null and definition's @@ -6793,26 +6794,27 @@ steps:
If this has a non-null shadow root whose - is declarative shadow root property is false, then throw an - "{{NotSupportedError!!exception}}" {{DOMException}}. +
If shadow host has a non-null shadow root, then: +
If shadow host's shadow root's is declarative + shadow root property is false, then throw an "{{NotSupportedError!!exception}}" {{DOMException}}. -
If this has a non-null shadow root whose - is declarative shadow root property is true, then remove all of - shadow root's children, in tree order. Return shadow host's shadow root. +
Otherwise, remove all of shadow root's children, in + tree order. Return shadow host's shadow root. -
This means that if multiple declarative shadow roots are contained within a single shadow host, - only the last one will remain. +
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 - is this's node document, host is shadow host, + is shadow host's node document, host is shadow host, and mode is mode.
Set shadow's delegates focus to delegates focus.
Set shadow's is declarative shadow root property to false. -
Set this's shadow root to shadow. +
Set shadow host's shadow root to shadow.
The
getInnerHTML(options)
method, when invoked, must return the result of running HTML fragment serialization algorithm,
-given this as node and options.includeShadowRoots as include shadow roots.
+given this as node, options.includeShadowRoots as include shadow roots,
+and options.closedRoots as closed shadow roots.
The
insertAdjacentElement(where, element)