How to access chrome flags in electron?


My app uses the wacom plugin, which uses NPAPI, which is deprecated by google Chrome from version 42.
In the chrome browser it still works by changing the chrome/flags/NPAPI to enabled.
Does anyone know if there is a way to access these flags in electron?


I believe you’re looking for the app.commandLine.appendSwitch method.

For instance, in one internal project I needed to use the now deprecated non-standard Proxy API of Chromium, so I ended up adding the following flag in my main file:

app.commandLine.appendSwitch "js-flags", "--harmony_proxies"


Yes, that’s it. Found the switch:
Now it works fine, thanks alot!


@tungsten, what version of electron and chromium this is supported for? We are also trying this flag with electron version 0.31.2 and chromium version 44, but it does not work. We tried both ways




your help will be much appreciated.


0.31.2 is the right version. I have


in my main.js
Also, web-preferences plugins should be set to true:

mainWindow = new BrowserWindow({x: 100, y: 100, width: 800, height: 600, 'web-preferences': {'plugins': true}});

have you got that?

Embedding a Unity3d webplayer

Thank you @tungsten, That did the trick.

We installed unity webplayer plugin through chrome. Firefox was also able to see that plugin for some reason. Even we did not have to specify any another information to electron’s chromium. it found it somehow. My guess is that it was somehow indicated by some windows registry.