Travis build: 1964

This commit is contained in:
30secondsofcode
2018-04-15 16:19:51 +00:00
parent 99ac5a6137
commit 7ed767059d
12 changed files with 36 additions and 11 deletions

View File

@ -206,6 +206,7 @@ average(1, 2, 3);
* [`hashBrowser`](#hashbrowser-) * [`hashBrowser`](#hashbrowser-)
* [`hide`](#hide) * [`hide`](#hide)
* [`httpsRedirect`](#httpsredirect) * [`httpsRedirect`](#httpsredirect)
* [`isBrowserTabFocused`](#isbrowsertabfocused)
* [`observeMutations`](#observemutations-) * [`observeMutations`](#observemutations-)
* [`off`](#off) * [`off`](#off)
* [`on`](#on) * [`on`](#on)
@ -3337,6 +3338,28 @@ httpsRedirect(); // If you are on http://mydomain.com, you are redirected to htt
<br>[⬆ Back to top](#table-of-contents) <br>[⬆ Back to top](#table-of-contents)
### isBrowserTabFocused
Returns `true` if the browser tab of the page is focused, `false` otherwise.
Use the `Document.hidden` property, introduced by the Page Visibility API to check if the browser tab of the page is visible or hidden.
```js
const isBrowserTabFocused = () => !document.hidden;
```
<details>
<summary>Examples</summary>
```js
isBrowserTabFocused(); // true
```
</details>
<br>[⬆ Back to top](#table-of-contents)
### observeMutations ![advanced](/advanced.svg) ### observeMutations ![advanced](/advanced.svg)
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