Re: [whatwg/dom] Consider adding localNameFilter to MutationObserver (#398)

Closes #850 

In which I proposed adding an `elementTagFilter` as there is no current functionality to support mutation to the DOM involving changes to specific element tags.

---

#### Repost description for new optional property:

New property: elementTagFilter (optional)

Description: An array of specific element types to be monitored. If this property isn't included, MutationObserverInit will still trigger notifications in the same way as previous to prevent backwards compatibility with existing web functionality. No default value

```js
let observer = new MutationObserver(mutations) => {
  mutations.forEach(mutation => {
    // immediate handle on all new 'input' elements on the page...
  });
});

observer.observe(document.documentElement, {
  childList: true,
  subtree: true,
  elementTagFilter: ['input']
});
```

-- 
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/issues/398#issuecomment-602799784

Received on Monday, 23 March 2020 19:10:14 UTC