Update on.md
This commit is contained in:
@ -7,7 +7,8 @@ Use `EventTarget.addEventListener()` to add an event listener to an element. If
|
||||
target specified and then invoke the callback by supplying the correct `this` context.
|
||||
Use `options` to pass options to `addEventListener` or omit it to use bubbling by default.
|
||||
In order to use this function with `off`, the reference to the custom delegator function
|
||||
is returned if the `target` option is specified.
|
||||
is returned if the `target` option is specified. Omit `opts` to default to non-delegation
|
||||
behavior and event bubbling.
|
||||
|
||||
```js
|
||||
const on = (el, evt, fn, opts = {}) => {
|
||||
|
||||
Reference in New Issue
Block a user