nodom icon indicating copy to clipboard operation
nodom copied to clipboard

Add support for web components

Open pakastin opened this issue 8 years ago • 2 comments

  • registerElement
  • connectedCallback
  • extend ...

pakastin avatar Nov 14 '17 15:11 pakastin

constructor An instance of the element is created or upgraded. Useful for initializing state, settings up event listeners, or creating shadow dom. See the spec for restrictions on what you can do in the constructor.

connectedCallback Called every time the element is inserted into the DOM. Useful for running setup code, such as fetching resources or rendering. Generally, you should try to delay work until this time.

disconnectedCallback Called every time the element is removed from the DOM. Useful for running clean up code.

attributeChangedCallback(attrName, oldVal, newVal) Called 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 the observedAttributes property will receive this callback.

adoptedCallback() The custom element has been moved into a new document (e.g. someone called document.adoptNode(el)).

MichaelFBA avatar Nov 14 '17 16:11 MichaelFBA

Perfect! 👌

pakastin avatar Nov 14 '17 17:11 pakastin