- onLifecycle(tag, onStart?, onRemove?, beforeRemove?): void
-
Parameters
-
-
Optional
onStart: ((tag) => boolean | Promise<boolean>)
-
- (tag): boolean | Promise<boolean>
-
Returns boolean | Promise<boolean>
-
Optional
onRemove: ((tag) => void)
-
Optional
beforeRemove: ((tag) => boolean | Promise<boolean>)
-
- (tag): boolean | Promise<boolean>
-
Returns boolean | Promise<boolean>
Returns void
Will call {onStart} when the element is added to the DOM. And will call {onRemove} when the element is removed from the DOM.