Events::getAllOf: Difference between revisions
No edit summary |
|||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
This function gets all handlers of the specified event. | This function gets all handlers of the specified event. | ||
== | ==Parameters== | ||
* ''' | * '''eventName''': <span style="color:#408DAE">String</span> | ||
==Return== | ===Return value=== | ||
* '''Array''' | *'''Array''': Function | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript"> | |||
let handlers = mp.events.getAllOf(eventName); | |||
</syntaxhighlight> | |||
==Example== | ==Example== | ||
Latest revision as of 20:39, 5 October 2020
This function gets all handlers of the specified event.
Parameters
- eventName: String
Return value
- Array: Function
Syntax
let handlers = mp.events.getAllOf(eventName);
Example
Server-Side
The example below gets all handlers of "myEvent".
eventHandlers = mp.events.getAllOf('myEvent');