You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If present, `"*"` handlers are invoked after type-matched handlers.
105
-
106
101
**Parameters**
107
102
108
-
-`type`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The event type to invoke
109
-
-`evt`**\[Any]** Any value (object is recommended and powerful), passed to each handler
103
+
-`all`**EventHandlerMap**
104
+
105
+
Returns **Mitt**
110
106
111
107
### on
112
108
113
109
Register an event handler for the given type.
114
110
115
111
**Parameters**
116
112
117
-
-`type`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of event to listen for, or `"*"` for all events
118
-
-`handler`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Function to call in response to given event
113
+
-`type`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of event to listen for, or `"*"` for all events
114
+
-`handler`**[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Function to call in response to given event
119
115
120
116
### off
121
117
122
118
Remove an event handler for the given type.
123
119
124
120
**Parameters**
125
121
126
-
-`type`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of event to unregister `handler` from, or `"*"`
127
-
-`handler`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Handler function to remove
122
+
-`type`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of event to unregister `handler` from, or `"*"`
123
+
-`handler`**[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Handler function to remove
124
+
125
+
### emit
126
+
127
+
Invoke all handlers for the given type.
128
+
If present, `"*"` handlers are invoked after type-matched handlers.
129
+
130
+
**Parameters**
131
+
132
+
-`type`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The event type to invoke
133
+
-`evt`**Any?** Any value (object is recommended and powerful), passed to each handler
0 commit comments