Reputation: 409
My code uses ES6 Proxy class. When run with PhantomJS (v 2.1.1) Proxy class is not found. I tried using harmony-reflect, but that doesn't work either. It says proxies not supported on this platform. On v8/node/iojs, make sure to pass the --harmony_proxies flag
. Would anyone have a clue how to make it work (hopefully not involving the use of Babel)?
Upvotes: 1
Views: 707
Reputation: 1074295
PhantomJS uses JavaScriptCore, which is the default JavaScript engine for WebKit and part of the WebKit project.
JSC doesn't support Proxy
yet; it's on the list and it looks like someone's been assigned to it at least since February.
Since Proxy
can't be polyfilled, you won't be able to use PhantomJS to run Proxy
code until JSC supports Proxy
and an updated PhantomJS is built against that updated JSC.
Upvotes: 2