Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does any version of PhantomJS support javascript generators?

I am using PhantomJS version 1.9.8, and I get an error "SyntaxError: Parse error" on a file that makes use of a generator (supported by javascript 1.7).

I can't find any documentation on what PhantomJS does and does not support, does anyone know of such a document? Or know of a workaround to get PhantomJS to parse function* and for..of statements?

like image 241
maxfowler Avatar asked May 05 '26 18:05

maxfowler


1 Answers

Since PhantomJS 2.0 is based on 7 month old WebKit and considering that even latest WebKit doesn't support generators yet, I'm pretty sure PhantomJS 2.0 does not support them.

We'll be adding it to the compat table soon, so you'll be able to see exact (and up to date) support breakdown.

like image 132
kangax Avatar answered May 08 '26 11:05

kangax



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!