Specifying Chrome flags for Electron?

Is there a way to change Chrome flags (usually accessed with chrome://flags in Chrome) for Electron?

For example, I’d like to have the overlay-scrollbars active for my app, which is accessed using chrome://flags/#overlay-scrollbars in Chrome.

I know about the js-flags parameter but it seems related to nodejs only. Is there something equivalent for rendering (chrome) related flags like overlay-scrollbars?

If you can’t find a feature that does this, you can probably useJavaScript to achieve the same thing.

I found a way to do it. Chrome flags can be enabled for each Electron window by using the webPreferences property:

const win=new BrowserWindow({
webPreferences: {
  enableBlinkFeatures: 'OverlayScrollbars'
1 Like