How to enable Experimental Web Platform Features


#1

Hi I would like to use the new CSS Grid layout properties.


I know how to enable the Experimental Web Platform Features in Chrome desktop. How do I enable them in Electron?

There is this thread but not very clear how to proceed: Full --js-flags support in v0.35.0 (Enable Experimental ECMAScript 6/7 Features, etc)

Thanks


#2

bumping this post


#3

When you create a BrowserWindow object, set the experimentalFeatures property to true.


#4

I am currently developing UI using CSS grid.I am using jquery and d3.js
I want my users’ browsers to enable their flags if disabled so as to enable css grid.
Could you please tell me how to do so using javascript/jquery and not manually.

Thank you.


#5

It’s a bit late, but I’m posting this to help future people coming here via Google or so.
Here’s how to instantiate your BrowserWindow with the experimental feature flag on, as @belltown suggested:

mainWindow = new BrowserWindow({ experimentalFeatures: true })

Can I use the Web Animations API?
#6

I’m not sure if the other answers were correct at the time they were written, but as of right now you enable them with this:

new BrowserWindow({ webPreferences: { experimentalFeatures: true } })

See https://github.com/electron/electron/blob/master/docs/api/browser-window.md