Constructor
# new CustomElement()
- Since:
- 1.7.0
- Copyright:
- schukai GmbH
// returns 3
globalNS.method(5, 15);
Methods
# (static) getTag() → {string}
there is no check on the name by this class. the developer is responsible for assigning an appropriate tag. if the name is not valid, registerCustomElement() will issue an erro
-
the method getTag must be overwritten by the derived class.
- Type
- Error
- Type
- string
# adoptedCallback() → {void}
The custom element has been moved into a new document (e.g. someone called document.adoptNode(el)).
- Type
- void
# attributeChangedCallback(attrName, oldVal, newVal) → {void}
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.
Name | Type | Description |
---|---|---|
attrName |
string | |
oldVal |
string | |
newVal |
string |
- Type
- void
# connectedCallback() → {void}
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.
- Type
- void
# disconnectedCallback() → {void}
Called every time the element is removed from the DOM. Useful for running clean up code.
- Type
- void