Let shadowRootRegistry be node's shadow root's custom element registry. +
If shadowRootRegistry is a global custom element registry, then set + shadowRootRegistry to document's + effective global custom element registry. +
Attach a shadow root with copy, node's
shadow root's mode, true, node's
shadow root's serializable, node's
@@ -4896,6 +4900,9 @@ and an optional document docume
If registry is null, then set registry to
fallbackRegistry.
+ If registry is a global custom element registry, then set
+ registry to document's effective global custom element registry.
+
Set copy to the result of creating an element, given
document, node's local name, node's
namespace, node's namespace prefix,
@@ -4920,10 +4927,18 @@ and an optional document docume
Set copy's encoding, content type,
- URL, origin, type,
- mode, allow declarative shadow roots, and
- custom element registry to those of node.
+ Set copy's encoding, content type,
+ URL, origin, type,
+ mode, and allow declarative shadow roots, to those of
+ node.
+
+ If node's custom element registry's
+ is scoped is true, then set copy's
+ custom element registry to node's
+ custom element registry.
+ Set copy's name, public ID, and
@@ -5774,6 +5789,7 @@ method steps are to return the list of elements with class names classNa
The HTML Standard will, e.g., define that for The
Return the result of creating an element given this, localName,
namespace, null, is, true, and registry.
+ The internal The
To flatten element creation options, given a string or {{ElementCreationOptions}}
dictionary options and a document document:
@@ -5833,6 +5855,10 @@ dictionary options and a document document:
If options["{{ElementCreationOptions/customElementRegistry}}"]
exists, then set registry to it.
+ If registry's is scoped is false and
+ registry is not document's custom element registry,
+ then throw a "{{NotSupportedError!!exception}}" {{DOMException}}.
+
If options["{{ElementCreationOptions/is}}"] exists, then set
is to it.
@@ -5848,6 +5874,7 @@ dictionary options and a document document:
{{Document/createElement()}} and {{Document/createElementNS()}}'s options
parameter is allowed to be a string for web compatibility.
+ The If options["{{ImportNodeOptions/customElementRegistry}}"]
exists, then set registry to it.
+
+ If registry's is scoped is false and
+ registry is not this's custom element registry, then
+ throw a "{{NotSupportedError!!exception}}" {{DOMException}}.
If registry is null, then set registry to the result of
@@ -5956,11 +5987,14 @@ method steps are:
+ Specifications may define
adopting steps for all or some nodes. The
-algorithm is passed node and oldDocument, as indicated in the adopt
-algorithm.
+algorithm is passed node and oldDocument, as indicated in the
+adopt algorithm.
+ To adopt a node into a document, run
these steps:
@@ -5981,9 +6015,24 @@ these steps:
Set inclusiveDescendant's node document to document.
- If inclusiveDescendant is an element, then set the
- node document of each attribute in inclusiveDescendant's
- attribute list to document.
+ If inclusiveDescendant is a shadow root and
+ inclusiveDescendant's custom element registry
+ is a global custom element registry, then set inclusiveDescendant's
+ custom element registry to document's
+ effective global custom element registry.
+
+ Otherwise, if inclusiveDescendant is an element:
+
+ Set the node document of each attribute in
+ inclusiveDescendant's attribute list to document.
+
+ If inclusiveDescendant's custom element registry
+ is a global custom element registry, then set inclusiveDescendant's
+ custom element registry to document's
+ effective global custom element registry.
+ For each inclusiveDescendant in node's
@@ -5997,7 +6046,9 @@ these steps:
adopting steps with inclusiveDescendant and oldDocument.
+ The Return node.
Null or a {{CustomElementRegistry}} object registry
+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:
+
+ If document's custom element registry
+ is a global custom element registry, then return document's
+ custom element registry.
+
+ Return null.
+ Let registry be this's custom element registry.
- If init["{{ShadowRootInit/customElementRegistry}}"] is non-null, then set
- registry to it.
+ If init["{{ShadowRootInit/customElementRegistry}}"] is non-null:
+
+ Set registry to init["{{ShadowRootInit/customElementRegistry}}"].
+
+ If registry's is scoped is false and
+ registry is not this's node document's
+ custom element registry, then throw a
+ "{{NotSupportedError!!exception}}" {{DOMException}}.
+ Run attach a shadow root with this,
init["{{ShadowRootInit/mode}}"], init["{{ShadowRootInit/clonable}}"],
+
html and the
HTML namespace, the {{HTMLHtmlElement}} interface is used. [[!HTML]]
+createElement(localName, options)
method steps are:
@@ -5795,7 +5811,9 @@ method steps are:
createElementNS steps, given document,
namespace, qualifiedName, and options, are as follows:
@@ -5811,13 +5829,17 @@ method steps are:
localName, namespace, prefix, is, true, and
registry.
+createElementNS(namespace, qualifiedName, options)
method steps are to return the result of running the
internal createElementNS steps, given this, namespace,
qualifiedName, and options.
+createDocumentFragment() method steps are to
return a new {{DocumentFragment}} node whose node document is
@@ -5944,6 +5971,10 @@ method steps are:
+
adoptNode(node) method steps are:
@@ -6014,6 +6065,24 @@ these steps:
+
+
+
+
@@ -7515,8 +7584,17 @@ are:
+