[w3c/webcomponents] Why does attributeChangedCallback fire when a new attribute value is the same? (#676)

Calling `.setAttribute('foo', 'bar')` repeatedly on the same element will continually trigger it's `attributeChangedCallback`.

This means I have to add conditional checking to my custom elements:

```js
attributeChangedCallback(attr, old, new) {
  if (old != new) {
    // ...
  }
}
```

This seems strange. Why is this?

Related: https://github.com/whatwg/dom/issues/520

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/676

Received on Friday, 13 October 2017 06:42:03 UTC