{"action":"closed","issue":{"url":"https://api.github.com/repos/atom/electron/issues/2908","labels_url":"https://api.github.com/repos/atom/electron/issues/2908/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/2908/comments","events_url":"https://api.github.com/repos/atom/electron/issues/2908/events","html_url":"https://github.com/atom/electron/issues/2908","id":108416203,"number":2908,"title":"Passing userAgent to loadURL","user":{"login":"startupfoundry","id":3033510,"avatar_url":"https://avatars.githubusercontent.com/u/3033510?v=3","gravatar_id":"","url":"https://api.github.com/users/startupfoundry","html_url":"https://github.com/startupfoundry","followers_url":"https://api.github.com/users/startupfoundry/followers","following_url":"https://api.github.com/users/startupfoundry/following{/other_user}","gists_url":"https://api.github.com/users/startupfoundry/gists{/gist_id}","starred_url":"https://api.github.com/users/startupfoundry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/startupfoundry/subscriptions","organizations_url":"https://api.github.com/users/startupfoundry/orgs","repos_url":"https://api.github.com/users/startupfoundry/repos","events_url":"https://api.github.com/users/startupfoundry/events{/privacy}","received_events_url":"https://api.github.com/users/startupfoundry/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-25T22:13:50Z","updated_at":"2015-09-26T00:02:31Z","closed_at":"2015-09-26T00:02:31Z","body":"Hello,\r\n\r\nI'm trying to pass userAgent to loadUrl (http://electron.atom.io/docs/v0.28.0/api/browser-window/#webcontents-loadurl-url-options), but I'm having trouble getting it to work. I've attached the code below.\r\n\r\n````mainWindow.loadUrl('https://google.com',[userAgent=\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36\"]);````\r\n\r\nThis code doesn't throw any errors, but doesn't seem to have an effect on setting the User Agent. My web app uses agent sniffing to know what webRTC implementation to load. If I open up web inspector and spoof a Chrome User Agent my app works perfectly.\r\n\r\nAm I missing something obvious? Thanks for your help"}}