Optional
adoptedThe custom element has been moved into a new document
(e.g. someone called document.adoptNode(el)
).
Optional
attributeCalled when an observed attribute has been added, removed, updated, or replaced. Also called for initial values when an element is created by the parser, or upgraded.
Note: only attributes listed in static observedAttributes
property will receive this callback.
Optional
connectedCalled every time the element is inserted into the DOM
Optional
disconnectedCalled every time the element is removed from the DOM.
See
https://developers.google.com/web/fundamentals/web-components/customelements#reactions