Travis build: 2036
This commit is contained in:
23
README.md
23
README.md
@ -210,6 +210,7 @@ average(1, 2, 3);
|
||||
* [`hide`](#hide)
|
||||
* [`httpsRedirect`](#httpsredirect)
|
||||
* [`isBrowserTabFocused`](#isbrowsertabfocused)
|
||||
* [`nodeListToArray`](#nodelisttoarray)
|
||||
* [`observeMutations`](#observemutations-)
|
||||
* [`off`](#off)
|
||||
* [`on`](#on)
|
||||
@ -3450,6 +3451,28 @@ isBrowserTabFocused(); // true
|
||||
<br>[⬆ Back to top](#table-of-contents)
|
||||
|
||||
|
||||
### nodeListToArray
|
||||
|
||||
Converts a `NodeList` to an array.
|
||||
|
||||
Use `Array.prototype.slice()` and `Function.prototype.call()` to convert a `NodeList` to an array.
|
||||
|
||||
```js
|
||||
const nodeListToArray = nodeList => Array.prototype.slice.call(nodeList);
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Examples</summary>
|
||||
|
||||
```js
|
||||
nodeListToArray(document.childNodes); // [ <!DOCTYPE html>, html ]
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<br>[⬆ Back to top](#table-of-contents)
|
||||
|
||||
|
||||
### observeMutations 
|
||||
|
||||
Returns a new MutationObserver and runs the provided callback for each mutation on the specified element.
|
||||
|
||||
Reference in New Issue
Block a user