Progressive Web Components.
DNA components follow the Custom Element life cycle specification, with the addition of the
render methods. The complete list of methods is:
Life cycle methods are dispatched by the DNA Virtual DOM implementation by default. When you are not using templates to update the tree, always use the
Invoked each time the custom element is appended into a document-connected element. This will happen each time the node is moved, and may happen before the element's contents have been fully parsed.
connectedCallbackmay be called once your element is no longer connected, use
Node.isConnectedto make sure.
Invoked each time the custom element is disconnected from the document's DOM.
Invoked each time one of the custom element's attributes is added, removed, or changed.
The method receives the attribute name as first argument, as well as the new value and the previous value (default
This method is very similar to
attributeChangedCallback and it is invoked each time one of the element's property is changed.
The signature is equivalent too: it receives the property name as first argument, as well as the new value and the previous value (default
The same of
propertyChangedCallback, but for state properties.