Re: [whatwg/dom] Add new mutation observer init options elementFilterByAttribute and elementLocalNameFilter (#885)

@AndrewRot commented on this pull request.



> @@ -3594,6 +3625,60 @@ run these steps:
 <ol>
  <li><p>Assert: either <var>addedNodes</var> or <var>removedNodes</var> <a for=set>is not empty</a>.
 
+ <li><p>If either <var>options</var>'s' {{MutationObserverInit/elementLocalNameFilter}} or
+ {{MutationObserverInit/elementHasAttributeNameFilter}} is present, then:
+
+ <ol>
+  <li><p>Let <var>nodeAttributesList</var> be <var>nodeAttributesList</var> of the node's attributes, "<code>node.getAttributeNames()</code>".

@rniwa - would the following suffice putting it inside of a code block? Or how is it preferred to be written here?
```
<code>
var nodeAttributesList = [];
for (var i = 0; i < element.attributes.length; i ++) { 
    nodeAttributesList.push(element.attributes[i].localName);
}
</code>
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/885#discussion_r475662936

Received on Monday, 24 August 2020 14:42:35 UTC