From 9d23cce2b6b088331d28d4c925f3bf5036728dd1 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 9 Dec 2014 14:51:35 -0800 Subject: [PATCH] Move "nodeintegration" and "plugins" to web-view-attributes --- atom/browser/lib/guest-view-manager.coffee | 2 +- atom/renderer/lib/web-view/web-view-attributes.coffee | 2 ++ atom/renderer/lib/web-view/web-view.coffee | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/atom/browser/lib/guest-view-manager.coffee b/atom/browser/lib/guest-view-manager.coffee index eef36f1fa20c..d5422c1b403e 100644 --- a/atom/browser/lib/guest-view-manager.coffee +++ b/atom/browser/lib/guest-view-manager.coffee @@ -87,7 +87,7 @@ attachGuest = (embedder, elementInstanceId, guestInstanceId, params) -> destroyGuest oldGuestInstanceId webViewManager.addGuest guestInstanceId, elementInstanceId, embedder, guest, - nodeIntegration: params.nodeIntegration + nodeIntegration: params.nodeintegration plugins: params.plugins preloadUrl: params.preload ? '' diff --git a/atom/renderer/lib/web-view/web-view-attributes.coffee b/atom/renderer/lib/web-view/web-view-attributes.coffee index 93d38495a83f..9df67251a060 100644 --- a/atom/renderer/lib/web-view/web-view-attributes.coffee +++ b/atom/renderer/lib/web-view/web-view-attributes.coffee @@ -170,6 +170,8 @@ WebViewImpl::setupWebViewAttributes = -> @attributes[webViewConstants.ATTRIBUTE_PARTITION] = new PartitionAttribute(this) @attributes[webViewConstants.ATTRIBUTE_SRC] = new SrcAttribute(this) @attributes[webViewConstants.ATTRIBUTE_HTTPREFERRER] = new HttpReferrerAttribute(this) + @attributes[webViewConstants.ATTRIBUTE_NODEINTEGRATION] = new BooleanAttribute(webViewConstants.ATTRIBUTE_NODEINTEGRATION, this) + @attributes[webViewConstants.ATTRIBUTE_PLUGINS] = new BooleanAttribute(webViewConstants.ATTRIBUTE_PLUGINS, this) autosizeAttributes = [ webViewConstants.ATTRIBUTE_MAXHEIGHT diff --git a/atom/renderer/lib/web-view/web-view.coffee b/atom/renderer/lib/web-view/web-view.coffee index a68f8e728d84..89a0d4488db6 100644 --- a/atom/renderer/lib/web-view/web-view.coffee +++ b/atom/renderer/lib/web-view/web-view.coffee @@ -180,8 +180,6 @@ class WebViewImpl params = instanceId: @viewInstanceId userAgentOverride: @userAgentOverride - nodeIntegration: @webviewNode.hasAttribute webViewConstants.ATTRIBUTE_NODEINTEGRATION - plugins: @webviewNode.hasAttribute webViewConstants.ATTRIBUTE_PLUGINS for attributeName, attribute of @attributes params[attributeName] = attribute.getValue() if @webviewNode.hasAttribute webViewConstants.ATTRIBUTE_PRELOAD