diff --git a/dom.bs b/dom.bs index 81d03af1f..bd504d566 100644 --- a/dom.bs +++ b/dom.bs @@ -3364,6 +3364,8 @@ dictionary MutationObserverInit { boolean attributeOldValue; boolean characterDataOldValue; sequence<DOMString> attributeFilter; + sequence<DOMString> elementByAttributeFilter; + sequence<DOMString> elementFilter; }; @@ -3442,6 +3444,19 @@ dictionary MutationObserverInit { attribute mutations need to be observed and {{MutationObserverInit/attributes}} is true or omitted. + +
observer . {{disconnect()}}
@@ -3479,6 +3494,14 @@ method steps are:
exist, then set options["{{MutationObserverInit/characterData}}"] to
true.
+ If options's {{MutationObserverInit/elementByAttributeFilter}} is present and + options's {{MutationObserverInit/childList}} is omitted, then set + options's {{MutationObserverInit/childList}} to true. + +
If options's {{MutationObserverInit/elementFilter}} is present and + options's {{MutationObserverInit/childList}} is omitted, then set + options's {{MutationObserverInit/childList}} to true. +
If none of options["{{MutationObserverInit/childList}}"],
options["{{MutationObserverInit/attributes}}"], and
options["{{MutationObserverInit/characterData}}"] is true, then throw a
@@ -3496,6 +3519,14 @@ method steps are:
options["{{MutationObserverInit/characterData}}"] is false, then throw a
TypeError
.
+
If options's {{MutationObserverInit/elementByAttributeFilter}} is present and
+ options's {{MutationObserverInit/childList}} is false, then throw a
+ TypeError
.
+
+
If options's {{MutationObserverInit/elementFilter}} 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 @@ -3635,6 +3666,67 @@ method steps are:
Assert: either addedNodes or removedNodes is not empty. +
If either options's' {{MutationObserverInit/elementFilter}} or + {{MutationObserverInit/elementByAttributeFilter}} is present, then: + +
Let filteredAddedNodes be an empty list. + +
Let filterRemovedNodes be an empty list. + +
For each node in addedNodes: + +
Let nodeAttributesList be the set of local names of node's + attributes. + +
If none of the following are true + +
then append node to filteredAddedNodes. +
For each node in removedNodes: + +
Let nodeAttributesList be the set of local names of node's + attributes. + +
If none of the following are true + +
then append node to 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.