D
D
Daniil Vshivtsev2017-03-21 10:19:43
PhantomJS
Daniil Vshivtsev, 2017-03-21 10:19:43

How to run phantomjs with object.assign?

QQ colleagues.
When I run the phantomjs script for a site that loads a js script with the Object.assign function, I get an error:

TypeError:: undefined is not a function (evaluating 'Object.assign')

I quickly found the reason - phantomjs does not work according to the ES-2015 standard, therefore, it does not know the Object.assign function. I also found the supposed solution - add a polyfill ( https://github.com/chuckplantain/phantomjs-polyfil... ) .
I tried to include a js file in different ways - both through injectJs and includeJs, and wrote require with an absolute path, but I still get this error.
The question is: how to connect this polyfill?
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question