Format snippets
This commit is contained in:
@ -9,8 +9,10 @@ Adds multiple event listeners with the same handler to an element.
|
||||
|
||||
```js
|
||||
const addMultipleListeners = (el, types, listener, options, useCapture) => {
|
||||
types.forEach(type => el.addEventListener(type, listener, options, useCapture));
|
||||
}
|
||||
types.forEach(type =>
|
||||
el.addEventListener(type, listener, options, useCapture)
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user