Slide 22
Slide 22 text
Element Lifecycle
class OrderMinicart extends HTMLElement {
constructor() {...}
connectedCallback() {...}
attributeChangedCallback(attr, oldVal, newVal) {...}
disconnectedCallback() {...}
}
customElements.define('order-minicart', OrderMinicart);
an element instance was created
element was attached to the DOM
element was removed from the DOM, cleanup
someone change an attribute