Update capturePage documentation for new location

This commit is contained in:
Kevin Sawicki 2016-07-05 17:26:05 -07:00
parent 12dddae2ca
commit ce4ef1ccb8
3 changed files with 29 additions and 11 deletions

View file

@ -892,17 +892,7 @@ Whether the window's document has been edited.
### `win.capturePage([rect, ]callback)`
* `rect` Object (optional) - The area of page to be captured
* `x` Integer
* `y` Integer
* `width` Integer
* `height` Integer
* `callback` Function
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.
Same as `webContents.capturePage([rect, ]callback)`.
### `win.loadURL(url[, options])`

View file

@ -664,6 +664,20 @@ webContents.on('found-in-page', (event, result) => {
const requestId = webContents.findInPage('api');
```
### `webContents.capturePage([rect, ]callback)`
* `rect` Object (optional) - The area of the page to be captured
* `x` Integer
* `y` Integer
* `width` Integer
* `height` Integer
* `callback` Function
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.
### `webContents.hasServiceWorker(callback)`
* `callback` Function

View file

@ -469,6 +469,20 @@ Prints `webview`'s web page. Same with `webContents.print([options])`.
Prints `webview`'s web page as PDF, Same with `webContents.printToPDF(options, callback)`
### `<webview>.capturePage([rect, ]callback)`
* `rect` Object (optional) - The area of the page to be captured
* `x` Integer
* `y` Integer
* `width` Integer
* `height` Integer
* `callback` Function
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.
### `<webview>.send(channel[, arg1][, arg2][, ...])`
* `channel` String