Events::getAllOf: Difference between revisions
| (One intermediate revision by one other user 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 value=== | |||
*'''Array''': Function | |||
==Syntax== | ==Syntax== | ||
| Line 5: | Line 11: | ||
let handlers = mp.events.getAllOf(eventName); | let handlers = mp.events.getAllOf(eventName); | ||
</syntaxhighlight> | </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');