use will-create-webview event

This commit is contained in:
Hari Juturu 2017-05-09 10:12:44 -07:00
parent a05eb9047e
commit 277c3155a6
2 changed files with 1 additions and 4 deletions

View file

@ -406,9 +406,6 @@ void WebContents::InitWithSessionAndOptions(v8::Isolate* isolate,
Init(isolate);
AttachAsUserData(web_contents);
if (IsGuest())
Emit("did-create-webview");
}
WebContents::~WebContents() {

View file

@ -310,7 +310,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `overrideWebViewSecurity` Boolean (optional) - Whether to enable [webview-tag](webview-tag.md)
ignoring the security restriction based on `nodeIntegration`. Enabling this option will
have security implication on creating `webview` with `nodeIntegration` disabled. To avoid the
security risk, listen to `will-create-webview` event on [web-contents](web-contents.md) and
security risk, listen to `will-attach-webview` event on [web-contents](web-contents.md) and
stop creating `webview` or removing preload scripts.
When setting minimum or maximum window size with `minWidth`/`maxWidth`/