ariya / phantomjs

Scriptable Headless Browser
http://phantomjs.org
BSD 3-Clause "New" or "Revised" License
29.47k stars 5.75k forks source link

canvas2d : context.setLineDash() undefined #12613

Closed maxkfranz closed 4 years ago

maxkfranz commented 10 years ago

It seems as though context.setLineDash() is not implemented. Are you using an outdated version of Webkit or are there issues with HTML5 canvas?

e.g.:

(1) Check out cytoscape.js

(2) In the documentation directory, run

phantomjs screencapture.js http://jsbin.com/suteci/latest test.png 5000 500x500

(3) Error as follows:

TypeError: 'undefined' is not a function (evaluating 's.setLineDash([])')

  http://cytoscape.github.io/cytoscape.js/api/cytoscape.js-latest/cytoscape.min.js:22
  http://cytoscape.github.io/cytoscape.js/api/cytoscape.js-latest/cytoscape.min.js:22
  http://cytoscape.github.io/cytoscape.js/api/cytoscape.js-latest/cytoscape.min.js:22 in r
  http://cytoscape.github.io/cytoscape.js/api/cytoscape.js-latest/cytoscape.min.js:22 in r
hunt commented 9 years ago

Got the same problem with latest release 1.9.8

WebDevTmas commented 9 years ago

We have the same error over here in version 1.9.8 As far as I know I can't upgrade to 2.* for linux distribution?

airdrummingfool commented 7 years ago

This may be due to QT not supporting context.setLineDash(). wkhtmltopdf just merged a PR (https://github.com/wkhtmltopdf/qt/pull/31) to their fork of QT in order to fix this - perhaps similar changes could be merged into https://github.com/Vitallium/qtwebkit in order to fix it for PhantomJS?

FlyingPumba commented 7 years ago

Same problem here with version 1.9.8. Is this fixed in newer versions ?

stale[bot] commented 4 years ago

Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!