Running the following code invokes attributeChangedCallback only once for appending "0".
iframe.srcdoc = '<a-a a=0></a-a>';
let element = document.querySelector();
element.setAttribute('a', '1');
Running the following code invokes attributeChangedCallback only once for appending "0".
iframe.srcdoc = '<a-a a=0></a-a>';
let element = document.querySelector('a-a');
element.setAttribute('a', '1');
Parsing does not invoke attributeChangedCallback for the following code.
iframe.srcdoc = '<a-a a=0></a-a>';
let invocations = [];
class C extends w.HTMLElement {
attributeChangedCallback() { invocations.push('invoked') };
}
w.customElements.define('a-a', C);
console.log(invocations.length); // prints 0
Parsing does not invoke attributeChangedCallback for the following code.
iframe.srcdoc = '<a-a a=0></a-a>';
let invocations = [];
class C extends w.HTMLElement {
attributeChangedCallback() { invocations.push('invoked') };
}
w.customElements.define('a-a', C);
console.log(invocations.length); // prints 0
Comment 1 by davaajav@google.com
, Sep 9 2016