Re: [w3c/webcomponents] What's the expected behavior of a class with observedAttributes but no attributeChangedCallback? (#555)

We can answer this by looking at the spec, in particular https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementregistry-define step 10. In this case, the observedAttributes property is ignored (step 10.6 is false, so 10.6.1 doesn't even run). Even if you put a getter, it is not supposed to be triggered, i.e. given

```js
customElements.define("x-x", class extends HTMLElement {
  static get observedAttributes() { console.log("does this happen?"); }
});
```

nothing should be logged to the console (and no error thrown).

Sounds like a bug with the polyfill :)

-- 
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/555#issuecomment-242870674

Received on Friday, 26 August 2016 22:52:30 UTC