doc: Explain BrowserWindow.capturePage.
This commit is contained in:
parent
4af802f215
commit
33ad68f7a7
1 changed files with 17 additions and 0 deletions
|
@ -290,6 +290,23 @@ Starts inspecting element at position (`x`, `y`).
|
||||||
|
|
||||||
### BrowserWindow.restartHangMonitorTimeout()
|
### BrowserWindow.restartHangMonitorTimeout()
|
||||||
|
|
||||||
|
### BrowserWindow.capturePage([rect, ]callback)
|
||||||
|
|
||||||
|
* `rect` Object - The area of page to be captured
|
||||||
|
* `x`
|
||||||
|
* `y`
|
||||||
|
* `width`
|
||||||
|
* `height`
|
||||||
|
* `callback` Function
|
||||||
|
|
||||||
|
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
|
||||||
|
encoded data of the snapshot. Omitting the `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.
|
||||||
|
|
||||||
### BrowserWindow.getPageTitle()
|
### BrowserWindow.getPageTitle()
|
||||||
|
|
||||||
Returns the title of web page.
|
Returns the title of web page.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue