From 277c3155a620730cd47346b130bf608530d6ed79 Mon Sep 17 00:00:00 2001 From: Hari Juturu Date: Tue, 9 May 2017 10:12:44 -0700 Subject: [PATCH] use will-create-webview event --- atom/browser/api/atom_api_web_contents.cc | 3 --- docs/api/browser-window.md | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index fab61d7f7c..a06ec2244d 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -406,9 +406,6 @@ void WebContents::InitWithSessionAndOptions(v8::Isolate* isolate, Init(isolate); AttachAsUserData(web_contents); - - if (IsGuest()) - Emit("did-create-webview"); } WebContents::~WebContents() { diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 9e994f82a0..ffa33b8d07 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -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`/