Expand all

Hook

An instance of a hook, created via mw.hook method.

Methods

add(…handler) → {Hook}static #

Register a hook handler.

Parameters:

Name Type Attributes Description
handler function repeatable

Function to bind.

Source:

Returns:

Type
Hook
Register a hook handler.

fire(…data) → {Hook}staticchainable #

Call hook handlers with data.

Parameters:

Name Type Attributes Description
data any repeatable
Source:

Returns:

Type
Hook
Call hook handlers with data.

remove(…handler) → {Hook}static #

Unregister a hook handler.

Parameters:

Name Type Attributes Description
handler function repeatable

Function to unbind.

Source:

Returns:

Type
Hook
Unregister a hook handler.