Browse Source

Document will-attach-webview

Kevin Sawicki 8 years ago
parent
commit
792f3c3030
1 changed files with 12 additions and 0 deletions
  1. 12 0
      docs/api/web-contents.md

+ 12 - 0
docs/api/web-contents.md

@@ -502,6 +502,18 @@ win.loadURL('http://github.com')
 
 Emitted when the devtools window instructs the webContents to reload
 
+#### Event: 'will-attach-webview'
+
+Returns:
+
+* `event` Event
+* `guest` WebContents - The contents of the guest page.
+* `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.
+
+Calling `event.preventDefault()` will destroy the guest page.
+
 ### Instance Methods
 
 #### `contents.loadURL(url[, options])`