Reputation: 15506
When minifying JavaScript in the handy tool by Google called Closure Compiler it gives the following error (and doesn't minify a thing):
Number of errors: 1 JSC_TRAILING_COMMA: Parse error. IE8 (and below) will parse trailing commas in array and object literals incorrectly. If you are targeting newer versions of JS, set the appropriate language_in option. at line 389 character 1 in all.js
theme : 'default', // The theme of the slider (default, theme1, theme2, t...
$(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, //
Upvotes: 4
Views: 5885
Reputation: 5468
You have three options to get rid of this warning:
Upvotes: 2
Reputation: 75307
The fault (for fear of simply rewording what the Closure Compiler error says) is that IE8 and below cannot parse object literals and array literals which have a trailing comma.
var obj = {
a: 1,
b: 2, // trailing comma is bad!
};
... vs...
var obj = {
a: 1,
b: 2 // no trailing comma!
};
The fix is to remove the trailing comma.
Upvotes: 10