If shadowRootRegistry is a global custom element registry, then set shadowRootRegistry to document's - effective global custom element registry. + custom element registry's effective global custom element registry.
Attach a shadow root with copy, node's
shadow root's mode, true, node's
@@ -4936,7 +4936,8 @@ and an optional document docume
fallbackRegistry.
If registry is a global custom element registry, then set
- registry to document's effective global custom element registry.
+ registry to document's custom element registry
+ effective global custom element registry.
Set copy to the result of creating an element, given
document, node's local name, node's
@@ -6071,7 +6072,8 @@ algorithm is passed node and oldDocument, as
then set inclusiveDescendant's custom element registry to
- document's effective global custom element registry.
+ document's custom element registry's
+ effective global custom element registry.
Otherwise, if inclusiveDescendant is an element:
@@ -6080,11 +6082,27 @@ algorithm is passed node and oldDocument, as
Set the node document of each attribute in
inclusiveDescendant's attribute list to document.
- If inclusiveDescendant's custom element registry is null
- or inclusiveDescendant's custom element registry's
- is scoped is false, then set
- inclusiveDescendant's custom element registry to
- document's effective global custom element registry.
+ If inclusiveDescendant's custom element registry is null
+ or inclusiveDescendant's custom element registry's
+ is scoped is false:
+
+ Let registry be null.
+
+ If inclusiveDescendant's custom element registry is
+ non-null, inclusiveDescendant's parent is null, or
+ inclusiveDescendant's parent is a {{DocumentFragment}} but not
+ a {{ShadowRoot}}, then set registry to document's
+ custom element registry.
+
+ Otherwise, set registry to the result of
+ looking up a custom element registry given inclusiveDescendant's
+ parent.
+
+ Set inclusiveDescendant's custom element registry
+ to registry's effective global custom element registry.
+
+
@@ -6127,13 +6145,12 @@ algorithm is passed node and oldDocument, as
is a global custom element registry if registry is non-null and
registry's is scoped is false.
A document document's effective global custom element registry -is: +
Null or a {{CustomElementRegistry}} object registry's +effective global custom element registry is:
If document's custom element registry - is a global custom element registry, then return document's - custom element registry. +
If registry is a global custom element registry, then return + registry.
Return null.