Protected
attribsOptional
cacheProtected
ctorOptional
elThis component's main DOM element, i.e. usually the element created when the component is IComponent.mounted. This element will be used as default by various helper methods in the Component class.
Optional
itemsProtected
keyProtected
tagSyntax sugar for $attribs, using this component's IComponent.el as default element to edit.
Syntax sugar for $clear, using this component's IComponent.el as default element to clear.
Syntax sugar for $comment, creates a new comment DOM node using this component's IComponent.el as default parent
.
Optional
idx: NumOrElementSame as $compile.
Syntax sugar for $el, using this component's IComponent.el as default parent
.
Optional
attribs: anyOptional
body: anyOptional
idx: NumOrElementSyntax sugar for $html, using this component's IComponent.el as default element to edit.
If using the default element, assumes this.el
is an existing HTMLElement
or SVGElement
.
Syntax sugar for $moveTo, using this component's IComponent.el as default element to migrate.
Optional
idx: NumOrElementSyntax sugar for $remove, using this component's IComponent.el as default element to remove.
Syntax sugar for $style, using this component's IComponent.el as default element to edit.
Syntax sugar for $text, using this component's IComponent.el as default element to edit.
If using the default element, assumes this.el
is an existing HTMLElement
.
Same as $tree.
Optional
index: NumOrElementAsync component lifecycle method to initialize & attach the component in the target DOM.
The index
arg is used to define the child index of where to mount the component in the parent element and SHOULD default to -1, causing the component to be appended to (rather than inserted into) the list of children. The index
arg MUST be passed to any DOM creation functions used within mount()
(e.g. $el, $tree). Likewise, for control-flow or wrapper components, the index
arg MUST be used when mounting child components in-place of the wrapper component itself (e.g. see $list, $klist, $sub etc.).
The optional additional varargs are only used by some component wrappers and are context specific to each.
Component update lifecycle method. Not always used, but if it is then intended to perform internal updates to reflect incoming state
arg in the DOM and/or child components.
Generated using TypeDoc
Abstract base class / IComponent implementation. Provides additional convenience methods for DOM element creation & manipulation.