Document the BrowserWindow.print().

This commit is contained in:
Cheng Zhao 2014-08-22 15:14:49 +08:00
parent 17c0888932
commit 4fda81a0b4

View file

@ -338,7 +338,7 @@ Changes the title of native window to `title`.
Returns the title of the native window.
**Note:** The title of web page can be different from the title of the native
**window.
window.
### BrowserWindow.flashFrame()
@ -408,10 +408,10 @@ Starts inspecting element at position (`x`, `y`).
### BrowserWindow.capturePage([rect, ]callback)
* `rect` Object - The area of page to be captured
* `x`
* `y`
* `width`
* `height`
* `x` Integer
* `y` Integer
* `width` Integer
* `height` Integer
* `callback` Function
Captures the snapshot of page within `rect`, upon completion `callback` would be
@ -426,6 +426,19 @@ encode it and use data URL to embed the image in HTML.
[remote](remote.md) if you are going to use this API in renderer
process.
### BrowserWindow.print([options])
* `options` Object
* `silent` Boolean - Don't ask user for print settings, defaults to `false`
* `printBackground` Boolean - Also prints the background color and image of
the web page, defaults to `false`.
Prints window's web page. When `silent` is set to `false`, atom-shell will pick
up system's default printer and default settings for printing.
Calling `window.print()` in web page is equivalent to call
`BrowserWindow.print({silent: false, printBackground: false})`.
### BrowserWindow.loadUrl(url)
Same with `webContents.loadUrl(url)`.