Commit c96ffe32 authored by Stephanus Volke's avatar Stephanus Volke

change html-custom-element.md documentation

parent d63f0ca2
Pipeline #698 passed with stages
in 21 seconds
......@@ -12,12 +12,12 @@ returns a Promise which resolves when the requested element is
aviable.
**Parameters**
- id {string} - id of the requested element
- id {string}: id of the requested element
**Return**
- {Promise<Node>} - resolve contains reference to the requested element
- {Promise<Node>}: resolve contains reference to the requested element
### addAttributeListener(Node, attrName, fn, IMT)
### addAttributeListener(node, attrName, fn, IMT)
Like an event listener but for attributes. It observes an elements
attribute for changes and invokes a pre defined callback function. For
......@@ -25,3 +25,8 @@ this js MutationObservers are used.
**Parameters**
- Node {Node}: reference to the element
- attrName {string}: name of the attribute to observe
- fn {function(node: Node, attrName: string)}: callback function
invoked at attribute change
- IMT {bool}: if `true` fn is executet immediately after listener is
registered
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