简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM