feat: promisify win.capturePage() (#15743)
* feat: promisify win.capturePage * mark optional arg correctly * Add to breaking changes doc * properly deprecate win.capturePage * remove change from api-contract * document both callback and promise versions * address docs feedback * update promisification progress doc
This commit is contained in:
parent
73fbb69c50
commit
41c2685204
9 changed files with 74 additions and 38 deletions
|
@ -1212,7 +1212,19 @@ Returns `Boolean` - Whether the window's document has been edited.
|
|||
* `callback` Function
|
||||
* `image` [NativeImage](native-image.md)
|
||||
|
||||
Same as `webContents.capturePage([rect, ]callback)`.
|
||||
Captures a snapshot of the page within `rect`. Upon completion `callback` will
|
||||
be called with `callback(image)`. The `image` is an instance of [NativeImage](native-image.md)
|
||||
that stores data of the snapshot. Omitting `rect` will capture the whole visible page.
|
||||
|
||||
**[Deprecated Soon](promisification.md)**
|
||||
|
||||
#### `win.capturePage([rect])`
|
||||
|
||||
* `rect` [Rectangle](structures/rectangle.md) (optional) - The bounds to capture
|
||||
|
||||
* 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.
|
||||
|
||||
#### `win.loadURL(url[, options])`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue