Sam*_*Sam 3 javascript minify google-closure-compiler
当谷歌通过名为Closure Compiler的方便工具中缩小JavaScript时,它会出现以下错误(并且不会缩小某个内容):
错误数:1 JSC_TRAILING_COMMA:解析错误.IE8(及以下)将错误地解析数组和对象文字中的尾随逗号.如果您要定位较新版本的JS,请设置相应的language_in选项.在all.js的第389行第1字符
theme : 'default', // The theme of the slider (default, theme1, theme2, t...
Run Code Online (Sandbox Code Playgroud)
$(window).load(function(){
jQuery('#slider1').autoSlider({
theme : 'default', // The theme of the slider (default, theme1, theme2, theme3)
width : '960', // The width of the slider, 100% for auto full width, set to 0 it will take the width of the largest image
autoHidePlayBtn : true, //
Run Code Online (Sandbox Code Playgroud)
错误(因为害怕简单地重写Closure Compiler错误所说的内容)是IE8及以下版本无法解析具有尾随逗号的对象文字和数组文字.
var obj = {
a: 1,
b: 2, // trailing comma is bad!
};
Run Code Online (Sandbox Code Playgroud)
......对......
var obj = {
a: 1,
b: 2 // no trailing comma!
};
Run Code Online (Sandbox Code Playgroud)
修复是删除尾随逗号.