Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardHTMLcustom-element lifecycleSingle-choice MCQ

During the upgrade of a custom element that already has two observed attributes present in the markup, in what order does the engine invoke the reactions?

customElements.define('x-el', class extends HTMLElement { static get observedAttributes() { return ['a', 'b']; } attributeChangedCallback(n){ console.log('attr', n); } connectedCallback(){ console.log('connected'); } }); // HTML parsed before define: // <x-el a="1" b="2"></x-el>