docs: BrowserWindow.capturePage nows returns NativeImage
This commit is contained in:
parent
2cdfef286a
commit
b77c03357c
1 changed files with 3 additions and 6 deletions
|
@ -490,12 +490,9 @@ Starts inspecting element at position (`x`, `y`).
|
||||||
* `callback` Function
|
* `callback` Function
|
||||||
|
|
||||||
Captures the snapshot of page within `rect`, upon completion `callback` would be
|
Captures the snapshot of page within `rect`, upon completion `callback` would be
|
||||||
called with `callback(image)`, the `image` is a `Buffer` that stores the PNG
|
called with `callback(image)`, the `image` is an instance of
|
||||||
encoded data of the snapshot. Omitting the `rect` would capture the whole
|
[NativeImage](native-image.md) that stores data of the snapshot. Omitting the
|
||||||
visible page.
|
`rect` would capture the whole visible page.
|
||||||
|
|
||||||
You can write received `image` directly to a `.png` file, or you can base64
|
|
||||||
encode it and use data URL to embed the image in HTML.
|
|
||||||
|
|
||||||
**Note:** Be sure to read documents on remote buffer in
|
**Note:** Be sure to read documents on remote buffer in
|
||||||
[remote](remote.md) if you are going to use this API in renderer
|
[remote](remote.md) if you are going to use this API in renderer
|
||||||
|
|
Loading…
Reference in a new issue