]> khamidou — GitHub mirrors - electron.git/commitdiff
Define a new useragent attribute on WebView tag
authorPaul Betts <paul@paulbetts.org>
Tue, 5 May 2015 23:24:20 +0000 (16:24 -0700)
committerPaul Betts <paul@paulbetts.org>
Tue, 19 May 2015 21:27:14 +0000 (14:27 -0700)
atom/renderer/lib/web-view/web-view-attributes.coffee
atom/renderer/lib/web-view/web-view-constants.coffee

index 05bd6141203f0e379499c0212c294a259e97a3f9..de370e124952f9102dbcb4d06458a531cadce6eb 100644 (file)
@@ -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)
index cda715423dd450f5dd94e1df9f9db4a6fb80171b..deb678e6a1e86873e137fad0cd28fc2fbced3d64 100644 (file)
@@ -14,6 +14,7 @@ module.exports =
   ATTRIBUTE_PLUGINS: 'plugins'
   ATTRIBUTE_DISABLEWEBSECURITY: 'disablewebsecurity'
   ATTRIBUTE_PRELOAD: 'preload'
+  ATTRIBUTE_USERAGENT: 'useragent'
 
   # Internal attribute.
   ATTRIBUTE_INTERNALINSTANCEID: 'internalinstanceid'