在IE6中打包/精简的javascript失败 - 如何调试? [英] Packed/minified javascript failing in IE6 - how to debug?
问题描述
行:12 //当然,第12行是空行
Char:1
错误:预期')'
代码:0
事情是:它工作IE7,Firefox和Chrome中的IE浏览器的问题只出现在IE6上。
解压缩后,我有近200kb的脚本通过8个文件传播。如何解决这个问题?
您是否已经验证了未分解的代码可以在IE6中成功运行?如果是这样,因为这是一个语法错误而不是运行时错误,我将采取的下一步是开始减少一半的JavaScript,将其缩小,并查看问题停止报告的时间。然后从那里继续二进制搜索。
I have a number of files which I combine and pack to produce a single, minified JS file. The problem is that when I minify the file (using packer), IE6 gives one of its characteristic helpful error messages.
Line: 12 // of course, line 12 is an empty line
Char: 1
Error: Expected ')'
Code: 0
The thing is: it works fine in IE7, Firefox and Chrome the problem only comes up for IE6.
Unpacked, I have almost 200kb of scripts spread through 8 files. How on earth do I fix this?
Have you already verified that the un-minified code can run successfully in IE6? If so, because this is a syntax error and not a runtime error, the next step I'd take is start halving the javascript, minifying it, and seeing when the problem stops being reported. Then continue binary searching from there.
这篇关于在IE6中打包/精简的javascript失败 - 如何调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!