Commit 97549d7a authored by Stephanus Volke's avatar Stephanus Volke

add documentation to html-custom-element

parent 37377f98
Pipeline #695 passed with stages
in 14 seconds
# HTMLCustomElement
This interface class extends the
- *waitForElementById*: equivalent of native getElementById, but works
asynchroneous and returns a Promise which resolves when the
requested element is aviable.
- *addAttributeListener*: like an event listener but for
attributes. It observes an element attribute for changes and invokes
a pre defined callback function. For this js MutationObservers are
used.
This interface class extends the native `HTMLElement` interface and
provides some additional, often used methods.
## Methods
### waitForElementById(id)
equivalent of native getElementById, but works asynchroneous and
returns a Promise which resolves when the requested element is
aviable.
*Parameters*
- id {string} - id of the requested element
*Return*
- {Promise<Node>} - resolve contains reference to the requested element
### addAttributeListener(Node, attrName, fn, IMT)
like an event listener but for attributes. It observes an element
attribute for changes and invokes a pre defined callback function. For
this js MutationObservers are used.
*Parameters*
-
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment