refactor: eliminate DecrementCapturerCount patch (#35710)

This commit is contained in:
Shelley Vohr 2022-10-05 10:51:33 -07:00 committed by GitHub
parent a6b6816bec
commit faafcc7f87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 164 additions and 10 deletions

View file

@ -1437,13 +1437,16 @@ Returns `boolean` - Whether the window's document has been edited.
#### `win.blurWebView()`
#### `win.capturePage([rect])`
#### `win.capturePage([rect, opts])`
* `rect` [Rectangle](structures/rectangle.md) (optional) - The bounds to capture
* `opts` Object (optional)
* `stayHidden` boolean (optional) - Keep the page hidden instead of visible. Default is `false`.
* `stayAwake` boolean (optional) - Keep the system awake instead of allowing it to sleep. Default is `false`.
Returns `Promise<NativeImage>` - Resolves with a [NativeImage](native-image.md)
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page. If the page is not visible, `rect` may be empty.
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page. If the page is not visible, `rect` may be empty. The page is considered visible when its browser window is hidden and the capturer count is non-zero. If you would like the page to stay hidden, you should ensure that `stayHidden` is set to true.
#### `win.loadURL(url[, options])`