Skip to main content
CustomTagOptions
Options for a custom tag
NameTypeDescription
decorator?(data:ObjectData, context:Record<string,any>) => ObjectDataOptional 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.
mounted?(el:any, data:any, instance:Recado, parent:ElementFacade, context:Record<string,any>) => voidCallback 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.
rendered?(el:any, data:any, instance:Recado, parent:ElementFacade, context:Record<string,any>) => voidCallback invoked when the tag has first been rendered.
templatestringTemplate to use to render the tag
updated?(el:any, data:any, instance:Recado) => voidCallback invoked after the tag has been re-rendered during an update.