Merge pull request #8584 from electron/new-webview-event
Add will-attach-webview event
This commit is contained in:
commit
acedc3e726
4 changed files with 59 additions and 3 deletions
|
@ -502,6 +502,20 @@ win.loadURL('http://github.com')
|
|||
|
||||
Emitted when the devtools window instructs the webContents to reload
|
||||
|
||||
#### Event: 'will-attach-webview'
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `webPreferences` Object - The web preferences that will be used by the guest
|
||||
page. This object can be modified to adjust the preferences for the guest
|
||||
page.
|
||||
* `params` Object - The other `<webview>` parameters such as the `src` URL.
|
||||
This object can be modified to adjust the parameters of the guest page.
|
||||
|
||||
Emitted when a `<webview>`'s web contents is being attached to this web
|
||||
contents. Calling `event.preventDefault()` will destroy the guest page.
|
||||
|
||||
### Instance Methods
|
||||
|
||||
#### `contents.loadURL(url[, options])`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue