HotComponent
hotstaq / Modules / HotComponent
Class: HotComponent
A component to preprocess.
Implements​
Table of contents​
Constructors​
Properties​
Methods​
Constructors​
constructor​
• new HotComponent(copy
, api?
)
Parameters​
Name | Type | Default value |
---|---|---|
copy | HotStaq | IHotComponent | undefined |
api | HotAPI | null |
Defined in​
Properties​
api​
• api: HotAPI
The connected API.
Implementation of​
Defined in​
elementOptions​
• elementOptions: ElementDefinitionOptions
The options to include with registering this component.
Implementation of​
Defined in​
events​
• events: Object
The events to trigger.
Index signature​
â–ª [name: string
]: { func
: Function
; options
: any
; type
: string
}
Implementation of​
Defined in​
htmlElement​
• htmlElement: HTMLElement
The associated HTMLElement.
Implementation of​
Defined in​
name​
• name: string
The name of the component.
Implementation of​
Defined in​
processor​
• processor: HotStaq
The processor to use.
Implementation of​
Defined in​
tag​
• tag: string
The name of the tag.
Implementation of​
Defined in​
type​
• type: string
The type of component.
Implementation of​
Defined in​
value​
• value: any
The value of the component.
Implementation of​
Defined in​
Methods​
click​
â–¸ Abstract
click(): Promise
<void
>
Handle a click event.
Returns​
Promise
<void
>
Defined in​
handleAttributes​
â–¸ Optional
handleAttributes(attributes
): Promise
<void
>
Handle the attributes manually.
Parameters​
Name | Type |
---|---|
attributes | NamedNodeMap |
Returns​
Promise
<void
>
Defined in​
onCreated​
â–¸ onCreated(element
): Promise
<any
>
Event that's called when this component is created. This is called before output is called. Right after this is called, the attributes from the HTMLElement will be processed. If the functionality of the attributes processing need to be overwritten, use the handleAttributes method to handle them.
Parameters​
Name | Type |
---|---|
element | HTMLElement |
Returns​
Promise
<any
>
Defined in​
output​
â–¸ Abstract
output(): Promise
<string
>
Output the component.
Returns​
Promise
<string
>