diff --git a/dom.bs b/dom.bs index d2af7842..3574b5fd 100644 --- a/dom.bs +++ b/dom.bs @@ -2910,17 +2910,13 @@ optional boolean suppressObservers (default f continue.
If inclusiveDescendant is an element: +
If inclusiveDescendant is an element and + inclusiveDescendant's custom element registry is non-null:
If inclusiveDescendant's custom element registry is - null, then set inclusiveDescendant's custom element registry to - the result of looking up a custom element registry given - inclusiveDescendant's parent. - -
Otherwise, if inclusiveDescendant's - custom element registry's is scoped is - true, append inclusiveDescendant's node document to +
If inclusiveDescendant's custom element registry's + is scoped is true, then append + inclusiveDescendant's node document to inclusiveDescendant's custom element registry's scoped document set. @@ -2937,25 +2933,13 @@ optional boolean suppressObservers (default f upgrade an element algorithm.
Otherwise, if inclusiveDescendant is a shadow root: - -
If inclusiveDescendant's custom element registry is - null and inclusiveDescendant's - keep custom element registry null is false, then set - inclusiveDescendant's custom element registry to the result - of looking up a custom element registry given inclusiveDescendant's - host. - -
Otherwise, if inclusiveDescendant's - custom element registry is non-null and - inclusiveDescendant's custom element registry's - is scoped is true, append - inclusiveDescendant's node document to - inclusiveDescendant's custom element registry's - scoped document set. -
Otherwise, if inclusiveDescendant is a shadow root, + inclusiveDescendant's custom element registry is non-null, and + inclusiveDescendant's custom element registry's + is scoped is true, then append + inclusiveDescendant's node document to + inclusiveDescendant's custom element registry's + scoped document set. @@ -6032,8 +6016,8 @@ algorithm is passed node and oldDocument, as
To adopt a node into a document, run -these steps: +
To adopt a node node into a +document document:
Let oldDocument be node's node document. @@ -6046,17 +6030,27 @@ these steps:
For each inclusiveDescendant in node's - shadow-including inclusive descendants: +
For each inclusiveDescendant of node's + shadow-including inclusive descendants, in shadow-including tree order:
Set inclusiveDescendant's node document 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. +
If inclusiveDescendant is a shadow root and if any of the following + are true: + +
inclusiveDescendant's custom element registry is null + and inclusiveDescendant's keep custom element registry null + is false; or + +
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: @@ -6065,21 +6059,23 @@ these steps:
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. +
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.
For each inclusiveDescendant in node's
- shadow-including inclusive descendants that is custom,
- enqueue a custom element callback reaction with inclusiveDescendant, callback
- name "adoptedCallback", and « oldDocument, document ».
+
For each inclusiveDescendant of node's
+ shadow-including inclusive descendants that is custom, in
+ shadow-including tree order: enqueue a custom element callback reaction with
+ inclusiveDescendant, callback name "adoptedCallback", and
+ « oldDocument, document ».
-
For each inclusiveDescendant in node's - shadow-including inclusive descendants, in shadow-including tree order, run the +
For each inclusiveDescendant of node's + shadow-including inclusive descendants, in shadow-including tree order: run the adopting steps with inclusiveDescendant and oldDocument.