Skip to main content

CustomTagOptions

Options for a custom tag

Properties

decorator()?

optional decorator: (data, context?) => ObjectData

Optional data decorator which will be invoked prior to a render and which can return additional data to use to render. The return value should be extra data: you should not manipulate the contents of the incoming data member. VisuallyJs will merge any data you return from this method into the current data prior to rendering.

Parameters

data

ObjectData

Data to use to decorate.

context?

Record<string, any>

Returns

ObjectData


mounted()?

optional mounted: (el, data, instance, parent, context?) => void

Callback invoked when the element this tag produced has been mounted. In the DOM this means that it is now in the Document, but this class does not know directly of the existence of the DOM.

Parameters

el

any

data

any

instance

Recado

parent

ElementFacade

context?

Record<string, any>

Returns

void


rendered()?

optional rendered: (el, data, instance, parent, context?) => void

Callback invoked when the tag has first been rendered.

Parameters

el

any

data

any

instance

Recado

parent

ElementFacade

context?

Record<string, any>

Returns

void


template

template: string

Template to use to render the tag


updated()?

optional updated: (el, data, instance) => void

Callback invoked after the tag has been re-rendered during an update.

Parameters

el

any

data

any

instance

Recado

Returns

void