-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No arrow functions despite harmony flag #2118
Comments
How about var v8 = require('v8')
v8.setFlagsFromString('--harmony-arrow-functions') |
Also |
Unfortunately, passing neither However,
now solves the problem. I was not aware arrow functions was masked but now I know that an extra flag is required. Thanks! |
@keizom I've tried your solution but I still get this error when launching electron:
Am I missing something? I'm using 0.29.1 |
@0x80 the code I used enabled arrow functions in a renderer process. Perhaps there is a difference between enabling a renderer process and the main process (?). I do not know electron well enough to know if this is the case. In the mean time, have you tried @steelbrain's method using |
@keizom The code in my renderer process runs through webpack and babel so that's not an issue I guess. I found my problem. You can only put ES6 code in a module that you then require. I was putting arrow functions right in the main.js file where also the v8.setFlagsFromString() calls were made. I don't think that's possible since the syntax will be interpreted/parsed before the flag settings have effect. Anyways it's working now! 👍 |
My main.js file contains this:
Yet arrow functions are unrecognized. Let, const, and classes still work (with "use script").
Using Electron v0.29.1 on Gentoo Linux 2.2
The text was updated successfully, but these errors were encountered: