Events::getAllOf: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
This function gets all handlers of the specified event. | This function gets all handlers of the specified event. | ||
==Syntax== | |||
<syntaxhighlight lang="javascript"> | |||
let handlers = mp.events.getAllOf(eventName); | |||
</syntaxhighlight> | |||
==Parameter(s)== | ==Parameter(s)== | ||
* ''' | * '''eventName''': <span style="color:#408DAE">String</span> | ||
==Return== | ==Return== | ||
* '''Array''' | * '''Array''' | ||
==Example== | ==Example== | ||
Revision as of 21:15, 4 February 2018
This function gets all handlers of the specified event.
Syntax
let handlers = mp.events.getAllOf(eventName);
Parameter(s)
- eventName: String
Return
- Array
Example
Server-Side
The example below gets all handlers of "myEvent".
eventHandlers = mp.events.getAllOf('myEvent');