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

@rniwa 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>".

This isn't right. node.getAttributeNames returns a list of qualified names.
In general, we don't want to be replying on other DOM APIs to define these algorithmic steps.
Also, node's attribute has a bunch of things: https://dom.spec.whatwg.org/#concept-attribute
What we want here is the local name so either we pick that here, or reference it when we filter it.

-- 
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#pullrequestreview-466332803

Received on Wednesday, 12 August 2020 23:01:05 UTC