feat: add contents.getBackgroundThrottling() + backgroundThrottling property (#21036)
This commit is contained in:
parent
7656480247
commit
4afc756094
7 changed files with 59 additions and 0 deletions
|
@ -1812,6 +1812,11 @@ Returns `Promise<void>` - Indicates whether the snapshot has been created succes
|
|||
|
||||
Takes a V8 heap snapshot and saves it to `filePath`.
|
||||
|
||||
#### `contents.getBackgroundThrottling()`
|
||||
|
||||
Returns `Boolean` - whether or not this WebContents will throttle animations and timers
|
||||
when the page becomes backgrounded. This also affects the Page Visibility API.
|
||||
|
||||
#### `contents.setBackgroundThrottling(allowed)`
|
||||
|
||||
* `allowed` Boolean
|
||||
|
@ -1879,3 +1884,8 @@ A [`Debugger`](debugger.md) instance for this webContents.
|
|||
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
|
||||
[SCA]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
|
||||
[`postMessage`]: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
|
||||
|
||||
#### `contents.backgroundThrottling`
|
||||
|
||||
A `Boolean` property that determines whether or not this WebContents will throttle animations and timers
|
||||
when the page becomes backgrounded. This also affects the Page Visibility API.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue