webview: api to get webcontents and associated host webcontents

This commit is contained in:
Robo 2016-02-17 14:22:19 +05:30
parent 537ead8917
commit 6fcc197db8
7 changed files with 46 additions and 5 deletions

View file

@ -842,6 +842,10 @@ win.webContents.on('did-finish-load', function() {
Returns the [session](session.md) object used by this webContents.
### `webContents.hostWebContents`
Returns the `WebContents` that might own this `WebContents`.
### `webContents.devToolsWebContents`
Get the `WebContents` of DevTools for this `WebContents`.

View file

@ -438,6 +438,10 @@ Sends an input `event` to the page.
See [webContents.sendInputEvent](web-contents.md##webcontentssendinputeventevent)
for detailed description of `event` object.
### `<webview>.getWebContents()`
Returns the [WebContents](web-contents.md) associated with this `webview`.
## DOM events
The following DOM events are available to the `webview` tag: