@vttforge/core / OnHook
Function: OnHook()
OnHook(
event): (target,context) =>void
Experimental
Call this method when a hook fires.
ts
class MyModule {
@OnHook('renderChatMessageHTML')
static onChatRender(message: unknown, html: HTMLElement) {}
}Only static methods: an instance method has no instance to run against at the time the listener is registered, and inventing one would be a guess.
New in 0.13, and no consumer has used it yet. The shape can change in a minor.
Parameters
event
string
Returns
(target, context) => void