From 3993161a635a59517741da6f219f404088673ad3 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Tue, 5 May 2015 16:24:20 -0700 Subject: [PATCH] Define a new useragent attribute on WebView tag --- atom/renderer/lib/web-view/web-view-attributes.coffee | 1 + atom/renderer/lib/web-view/web-view-constants.coffee | 1 + 2 files changed, 2 insertions(+) diff --git a/atom/renderer/lib/web-view/web-view-attributes.coffee b/atom/renderer/lib/web-view/web-view-attributes.coffee index 05bd6141203f..de370e124952 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 cda715423dd4..deb678e6a1e8 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'