简体   繁体   中英

Chrome: Uncaught Syntax Error : Unexpected token

Page here

Seems like chrome is the only browser having problems with this bit of javascript. I have found that if I remove the '//' from the CDATA tags chrome will give me a line number for the error - line 48. I dont even know where start with this bug unfortunately. The code works as expected but it just takes a bit longer to load/parse with chrome.

I have tried to use script as an external file (float.js) but the error is the same. In production the code will need to be included in the html body though. Any suggestions?

Edit: It was an extension causing this error, is there any way to code against this?

it was the 'Smooth Gestures' extension. removing fixed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM