use will-create-webview event
This commit is contained in:
parent
a05eb9047e
commit
277c3155a6
2 changed files with 1 additions and 4 deletions
|
@ -406,9 +406,6 @@ void WebContents::InitWithSessionAndOptions(v8::Isolate* isolate,
|
||||||
|
|
||||||
Init(isolate);
|
Init(isolate);
|
||||||
AttachAsUserData(web_contents);
|
AttachAsUserData(web_contents);
|
||||||
|
|
||||||
if (IsGuest())
|
|
||||||
Emit("did-create-webview");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WebContents::~WebContents() {
|
WebContents::~WebContents() {
|
||||||
|
|
|
@ -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)
|
* `overrideWebViewSecurity` Boolean (optional) - Whether to enable [webview-tag](webview-tag.md)
|
||||||
ignoring the security restriction based on `nodeIntegration`. Enabling this option will
|
ignoring the security restriction based on `nodeIntegration`. Enabling this option will
|
||||||
have security implication on creating `webview` with `nodeIntegration` disabled. To avoid the
|
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.
|
stop creating `webview` or removing preload scripts.
|
||||||
|
|
||||||
When setting minimum or maximum window size with `minWidth`/`maxWidth`/
|
When setting minimum or maximum window size with `minWidth`/`maxWidth`/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue