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
|
@ -1050,14 +1050,23 @@ console.log(requestId)
|
|||
|
||||
#### `contents.capturePage([rect, ]callback)`
|
||||
|
||||
* `rect` [Rectangle](structures/rectangle.md) (optional) - The area of the page to be captured.
|
||||
* `rect` [Rectangle](structures/rectangle.md) (optional) - The bounds to capture
|
||||
* `callback` Function
|
||||
* `image` [NativeImage](native-image.md)
|
||||
|
||||
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.
|
||||
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)**
|
||||
|
||||
#### `contents.capturePage([rect])`
|
||||
|
||||
* `rect` [Rectangle](structures/rectangle.md) (optional) - The area of the page to be captured.
|
||||
|
||||
* 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.
|
||||
|
||||
#### `contents.hasServiceWorker(callback)`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue