Travis build: 2036
This commit is contained in:
23
README.md
23
README.md
@ -210,6 +210,7 @@ average(1, 2, 3);
|
|||||||
* [`hide`](#hide)
|
* [`hide`](#hide)
|
||||||
* [`httpsRedirect`](#httpsredirect)
|
* [`httpsRedirect`](#httpsredirect)
|
||||||
* [`isBrowserTabFocused`](#isbrowsertabfocused)
|
* [`isBrowserTabFocused`](#isbrowsertabfocused)
|
||||||
|
* [`nodeListToArray`](#nodelisttoarray)
|
||||||
* [`observeMutations`](#observemutations-)
|
* [`observeMutations`](#observemutations-)
|
||||||
* [`off`](#off)
|
* [`off`](#off)
|
||||||
* [`on`](#on)
|
* [`on`](#on)
|
||||||
@ -3450,6 +3451,28 @@ isBrowserTabFocused(); // true
|
|||||||
<br>[⬆ Back to top](#table-of-contents)
|
<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 
|
### observeMutations 
|
||||||
|
|
||||||
Returns a new MutationObserver and runs the provided callback for each mutation on the specified element.
|
Returns a new MutationObserver and runs the provided callback for each mutation on the specified element.
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user