setOffscreenRender and api docs added

This commit is contained in:
gellert 2015-08-29 00:45:00 +02:00
parent e4c01f3187
commit 58081ca9e9
5 changed files with 65 additions and 19 deletions

View file

@ -74,6 +74,8 @@ You can also create a window without chrome by using
Linux.
* `standard-window` Boolean - Uses the OS X's standard window instead of the
textured window. Defaults to `true`.
* `offscreen-render` Boolean - The frame of the window will be accessible
through the `frame-rendered` event in a buffer. Defaults to `false`.
* `web-preferences` Object - Settings of web page's features
* `javascript` Boolean
* `web-security` Boolean - When setting `false`, it will disable the same-origin
@ -226,6 +228,15 @@ Emitted when devtools is closed.
Emitted when devtools is focused / opened.
### Event: 'frame-rendered'
* `event` Event
* `frame` Buffer
* `size` Number
Emitted when *offscreen render* is enabled, the current frame's pixel data
and size are available.
### Event: 'app-command':
Emitted when an [App Command](https://msdn.microsoft.com/en-us/library/windows/desktop/ms646275(v=vs.85).aspx) is invoked. These are typically related to keyboard media keys or browser commands, as well as the "Back" button built into some mice on Windows.
@ -721,6 +732,11 @@ Returns whether the window is visible on all workspaces.
**Note:** This API always returns false on Windows.
### BrowserWindow.setOffscreenRender(isOffscreen)
Sets the offscreen rendering, if `true` the `frame-rendered` event will fire,
when the frame changes.
## Class: WebContents
A `WebContents` is responsible for rendering and controlling a web page.