From: Paul Betts Date: Tue, 5 May 2015 23:24:20 +0000 (-0700) Subject: Define a new useragent attribute on WebView tag X-Git-Tag: v0.26.1~21^2~8 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=3993161a635a59517741da6f219f404088673ad3;p=electron.git Define a new useragent attribute on WebView tag --- diff --git a/atom/renderer/lib/web-view/web-view-attributes.coffee b/atom/renderer/lib/web-view/web-view-attributes.coffee index 05bd6141..de370e12 100644 --- a/atom/renderer/lib/web-view/web-view-attributes.coffee +++ b/atom/renderer/lib/web-view/web-view-attributes.coffee @@ -190,6 +190,7 @@ 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_USERAGENT] = new UserAgentAttribute(this) @attributes[webViewConstants.ATTRIBUTE_NODEINTEGRATION] = new BooleanAttribute(webViewConstants.ATTRIBUTE_NODEINTEGRATION, this) @attributes[webViewConstants.ATTRIBUTE_PLUGINS] = new BooleanAttribute(webViewConstants.ATTRIBUTE_PLUGINS, this) @attributes[webViewConstants.ATTRIBUTE_DISABLEWEBSECURITY] = new BooleanAttribute(webViewConstants.ATTRIBUTE_DISABLEWEBSECURITY, this) diff --git a/atom/renderer/lib/web-view/web-view-constants.coffee b/atom/renderer/lib/web-view/web-view-constants.coffee index cda71542..deb678e6 100644 --- a/atom/renderer/lib/web-view/web-view-constants.coffee +++ b/atom/renderer/lib/web-view/web-view-constants.coffee @@ -14,6 +14,7 @@ module.exports = ATTRIBUTE_PLUGINS: 'plugins' ATTRIBUTE_DISABLEWEBSECURITY: 'disablewebsecurity' ATTRIBUTE_PRELOAD: 'preload' + ATTRIBUTE_USERAGENT: 'useragent' # Internal attribute. ATTRIBUTE_INTERNALINSTANCEID: 'internalinstanceid'