I need to set the UserAgent in electron to include the touch
flag since I am writing the application for touch screens and it doesn't seem to auto detect that it is running on a touch screen.
Any help would be nice, I already tried setting it in the BrowserWindow.loadURL options param.
You can set the User-Agent header in the main process using onBeforeSendHeaders:
Before loading file, you can call BrowserWindowInstance.webContents.setUserAgent()
Works with electron 3.0.4 Previous solutions didn't work for me.
Just use an option object when loading the URL.