diff options
| author | Jason Miller <[email protected]> | 2021-06-22 18:21:48 -0400 |
|---|---|---|
| committer | Jason Miller <[email protected]> | 2021-06-22 18:21:48 -0400 |
| commit | 4cce9cb6397af70498525c7b1cc829de2b21edc9 (patch) | |
| tree | 8ce02051ee44fe760687ff868ec37c76a3affe12 /README.md | |
| parent | 53eb689c83bca78d9275f724995406495262c333 (diff) | |
Add support for mitt.off("type"), which removes all handlers of a given type
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -140,12 +140,12 @@ Register an event handler for the given type. ### off Remove an event handler for the given type. -If omit the `handler`, all event handlers of the given type are deleted. +If `handler` is omitted, all handlers of the given type are removed. #### Parameters - `type` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol))** Type of event to unregister `handler` from, or `'*'` -- `handler` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Handler function to remove +- `handler` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** Handler function to remove ### emit |
