[whatwg/dom] MutationObserver: observing attribute changes fires even if the value didn't change. (#520)

If I call `setAttribute(sameValueAsBefore)` on an element, passing the same value as the attribute already has, the MutationObserver instance still register a mutation. This is my observer:

```js
const attributeChangedObserver = new MutationObserver( records => {
    console.log( ' ---------- attribute change records', records )
} )

attributeChangedObserver.observe( element, {
    attributes: true,
    attributeOldValue: true,
    attributeFilter: observedAttributes
} )
```

This seems strange, because the attribute value didn't change. Why is it this way?

-- 
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/520

Received on Friday, 13 October 2017 06:39:16 UTC