Regarding custom-element lifecycle ordering: an autonomous custom element is defined AFTER the parser has already created the element in the DOM (upgrade scenario). In what order do reactions fire during upgrade, and what is the state of attributes/children?
<my-el data-x="1">text</my-el>
<script>
customElements.define('my-el', class extends HTMLElement {
static observedAttributes = ['data-x'];
constructor(){ super(); }
connectedCallback(){ /* A */ }
attributeChangedCallback(){ /* B */ }
});
</script>