diff --git a/dom.bs b/dom.bs index afe7880a0..f6923f4b5 100644 --- a/dom.bs +++ b/dom.bs @@ -3398,6 +3398,19 @@ dictionary MutationObserverInit { attribute mutations need to be observed and {{MutationObserverInit/attributes}} is true or omitted. + +
observer . {{disconnect()}}
@@ -3437,6 +3450,14 @@ method, when invoked, must run these steps:
options's {{MutationObserverInit/characterData}} is omitted, then set
options's {{MutationObserverInit/characterData}} to true.
+ If options's {{MutationObserverInit/elementHasAttributeNameFilter}} is present and + options's {{MutationObserverInit/childList}} is omitted, then set + options's {{MutationObserverInit/childList}} to true. + +
If options's {{MutationObserverInit/elementLocalNameFilter}} is present and + options's {{MutationObserverInit/childList}} is omitted, then set + options's {{MutationObserverInit/childList}} to true. +
If none of options's {{MutationObserverInit/childList}},
{{MutationObserverInit/attributes}}, and {{MutationObserverInit/characterData}} is true, then
throw a TypeError
.
@@ -3453,6 +3474,14 @@ method, when invoked, must run these steps:
options's {{MutationObserverInit/characterData}} is false, then throw a
TypeError
.
+
If options's {{MutationObserverInit/elementHasAttributeNameFilter}} is present and
+ options's {{MutationObserverInit/childList}} is false, then throw a
+ TypeError
.
+
+
If options's {{MutationObserverInit/elementLocalNameFilter}} is present and
+ options's {{MutationObserverInit/childList}} is false, then throw a
+ TypeError
.
+
For each registered of target's registered observer list, if registered's @@ -3594,6 +3623,60 @@ run these steps:
Assert: either addedNodes or removedNodes is not empty. +
If either options's' {{MutationObserverInit/elementLocalNameFilter}} or + {{MutationObserverInit/elementHasAttributeNameFilter}} is present, then: + +
Let nodeAttributesList be nodeAttributesList of the node's attributes, "node.getAttributeNames()
".
+
+
Let filteredAddedNodes be an empty list. + +
Let filterRemovedNodes be an empty list. + +
For each node in addedNodes. + +
If none of the following are true + +
node.localName
" is in {{MutationObserverInit/elementLocalNameFilter}}
+
+ then: +
Enqueue record node in filteredAddedNodes +
For each node in removedNodes. +
If none of the following are true +
node.localName
" is in {{MutationObserverInit/elementLocalNameFilter}}
+ then: +
Enqueue record node in filterRemovedNodes +
Assert: either filteredAddedNodes or filteredRemovedNodes is not empty. + +
Set addedNodes to filteredAddedNodes + +
Set removedNodes to filteredRemovedNodes +
Queue a mutation record of "childList
" for target with
null, null, null, addedNodes, removedNodes, previousSibling,
and nextSibling.