phantomjs icon indicating copy to clipboard operation
phantomjs copied to clipboard

Phantom 2.1.1 chokes on string.startsWith()

Open RichardNeill opened this issue 9 years ago • 4 comments

string.startsWith() has been part of javascript for sometime now. It's widely supported in modern browsers. However, it makes phantomJS fail rather badly. (Similar failures affect wkhtml2pdf).

To see it, look at the attached html file (a very simple test-case), and view it in a web browser. Comment out either of the .startsWith() or .match() lines, and it works the same.

Then try ./phantomjs rasterize.js ~/test.html test.pdf the startsWith() line causes it to complain: TypeError: undefined is not a function (evaluating 'aaa.startsWith("alpha")')

test.txt

RichardNeill avatar May 24 '17 04:05 RichardNeill

I'm also seeing this behavior

BobbyCannon avatar Nov 29 '17 21:11 BobbyCannon

Is this closed because it is fixed?

hayd avatar Feb 03 '18 01:02 hayd

@RichardNeill @BobbyCannon @hayd Please see this

ghost avatar Feb 03 '18 09:02 ghost

@hayd

@RichardNeill @BobbyCannon @hayd Please see this

Not Found. How to fix?

cxiao84 avatar Jun 09 '22 10:06 cxiao84