Skip to main content

HotComponent

hotstaq / Modules / HotComponent

Class: HotComponent

A component to preprocess.

Implements​

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new HotComponent(copy, api?)

Parameters​

NameTypeDefault value
copyHotStaq | IHotComponentundefined
apiHotAPInull

Defined in​

HotComponent.ts:101

Properties​

api​

• api: HotAPI

The connected API.

Implementation of​

IHotComponent.api

Defined in​

HotComponent.ts:77


elementOptions​

• elementOptions: ElementDefinitionOptions

The options to include with registering this component.

Implementation of​

IHotComponent.elementOptions

Defined in​

HotComponent.ts:81


events​

• events: Object

The events to trigger.

Index signature​

â–ª [name: string]: { func: Function ; options: any ; type: string }

Implementation of​

IHotComponent.events

Defined in​

HotComponent.ts:93


htmlElement​

• htmlElement: HTMLElement

The associated HTMLElement.

Implementation of​

IHotComponent.htmlElement

Defined in​

HotComponent.ts:65


name​

• name: string

The name of the component.

Implementation of​

IHotComponent.name

Defined in​

HotComponent.ts:69


processor​

• processor: HotStaq

The processor to use.

Implementation of​

IHotComponent.processor

Defined in​

HotComponent.ts:61


tag​

• tag: string

The name of the tag.

Implementation of​

IHotComponent.tag

Defined in​

HotComponent.ts:73


type​

• type: string

The type of component.

Implementation of​

IHotComponent.type

Defined in​

HotComponent.ts:85


value​

• value: any

The value of the component.

Implementation of​

IHotComponent.value

Defined in​

HotComponent.ts:89

Methods​

click​

â–¸ Abstract click(): Promise<void>

Handle a click event.

Returns​

Promise<void>

Defined in​

HotComponent.ts:152


handleAttributes​

â–¸ Optional handleAttributes(attributes): Promise<void>

Handle the attributes manually.

Parameters​

NameType
attributesNamedNodeMap

Returns​

Promise<void>

Defined in​

HotComponent.ts:147


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​

NameType
elementHTMLElement

Returns​

Promise<any>

Defined in​

HotComponent.ts:139


output​

â–¸ Abstract output(): Promise<string>

Output the component.

Returns​

Promise<string>

Defined in​

HotComponent.ts:157