]> khamidou — GitHub mirrors - electron.git/commitdiff
Move "nodeintegration" and "plugins" to web-view-attributes
authorCheng Zhao <zcbenz@gmail.com>
Tue, 9 Dec 2014 22:51:35 +0000 (14:51 -0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 9 Dec 2014 22:51:35 +0000 (14:51 -0800)
atom/browser/lib/guest-view-manager.coffee
atom/renderer/lib/web-view/web-view-attributes.coffee
atom/renderer/lib/web-view/web-view.coffee

index eef36f1fa20c4211b6b7e461e76722547b67225e..d5422c1b403eb1d649881bee18ff3ad862976cba 100644 (file)
@@ -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 ? ''
 
index 93d38495a83ff7414b77295507c39a82be0663f3..9df67251a0600e8d7ceee3f7506a4f57441ada96 100644 (file)
@@ -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
index a68f8e728d84fd5d0f746cb48e1c478e7ddde70a..89a0d4488db60248d9d73df8aaacf11786f2be2f 100644 (file)
@@ -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