1

I've been facing this issue from the past two days where in the html code is throwing an error for "Expected :". I'm basically using canvasjs along with jspdf and on load of the page I get that error. I replace my local copy with the cdn link thinking that the issue would get resolved, but it still didn't get solved.

Error that is coming:

Expected ':' jspdf.debug.js, line 1023 character 9

The error is occurring the main file for jspdf hence I can't proceed further. The following code is writting the the above mentioned line:

        'pageSize' : {
            get width() {            //<<<<<<this line is causing the error
                return pageWidth
            },
            get height() {           //<<<<<<I'm assuming this line will also causing an error
                return pageHeight
            }
        },

The same code is found at the CDN link. The CDN link is as follows: https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.1.135/jspdf.debug.js

Thanks in advance!!!!

4

1 回答 1

0

对于遇到此问题的人来说,这似乎是您使用的 IE 版本和 chrome 版本的问题。我使用的是不支持 JSPDF 的 IE 8,因此我在 IE 中遇到了该错误。Chrome 版本出现了同样的错误:17.0.963.83。现在也更新了 Chrome。现在一切正常!

于 2015-11-24T06:07:07.557 回答