Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8412767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:45:35+00:00 2026-06-10T00:45:35+00:00

Possible Duplicate: Internet Explorer, Closure Compiler and Trailing Commas I’ve tried compressing my javascript

  • 0

Possible Duplicate:
Internet Explorer, Closure Compiler and Trailing Commas

I’ve tried compressing my javascript code using the Closure Compiler and the compilation of the code generated these two errors:

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
379 character 0 fontFamily :
jqTextareaDiv.css(“font-family”).replace(/[“‘]{1}/gi,””),

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
932 character 0 fontFamily : jqDiv.css(“font-family”),

These two errros seem to refer to this code:

var jqTextareaDiv = obj.target.parent().parent(),
                            style = {       // the current, relevant style rules for the DIV nesting the textarea
                                fontFamily     : jqTextareaDiv.css("font-family").replace(/["']{1}/gi,""),
                                fontSize       : jqTextareaDiv.css("font-size"),
                                fontStyle      : jqTextareaDiv.css("font-style"),
                                fontWeight     : jqTextareaDiv.css("font-weight"),
                                textDecoration : jqTextareaDiv.css("text-decoration"),
                                textAlign      : jqTextareaDiv.css("text-align"),
                                color          : jqTextareaDiv.css("color"),
                            },
                            jqToolbox = $('#text-edit-toolbox'),
                            jqIndicators = {
                                fontFamily                : $('#font-family-indicator'),
                                fontSize                  : $('#font-size-indicator'),
                                fontStyle                 : $('#font-format-indicators .font-style'),
                                fontWeight                : $('#font-format-indicators .font-weight'),
                                textDecorationUnderline   : $('#font-format-indicators .underline'),
                                textDecorationLineThrough : $('#font-format-indicators .line-through'),
                                textAlignLeft             : $('#text-alignment-indicators .align-left'),
                                textAlignCenter           : $('#text-alignment-indicators .align-center'),
                                textAlignRight            : $('#text-alignment-indicators .align-right'),
                                textAlignJustify          : $('#text-alignment-indicators .align-justify')
                            };

Exactly which is the trailing comma in this case and how can I remove it without breaking the code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:45:36+00:00Added an answer on June 10, 2026 at 12:45 am

    A trailing comma is a comma that follows the final element in an array or object literal. So like this:

    ['a', 'b', 'c',] // with trailing comma
    ['a', 'b', 'c']  // without trailing comma
    

    In this case, the trailing comma follows the last element in your object literal:

    color          : jqTextareaDiv.css("color"),
    

    If you remove it, the expected behaviour will occur. With it there, IE<9 won’t like it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Redirecting to a new page when a user is using Internet Explorer
Possible Duplicate: Running Internet Explorer 6, Internet Explorer 7, and Internet Explorer 8 on
Possible Duplicate: Raphaeljs and Internet Explorer, problem when clicking an element I'm trying to
Possible Duplicate: && operator in Javascript In the sample code of the ExtJS web
Possible Duplicate: <blink> tag in Internet Explorer Hai I have used blink tag to
Possible Duplicate: how to disable javascript errors on “twebbrowser” ? I'm using the TWebBrowser
Possible Duplicates: Javascript toSource() method not working Implementing Mozilla’s toSource() method in Internet Explorer.
Possible Duplicate: how can i validate a url in javascript using regular expression I
Possible Duplicate: Running Internet Explorer 6, Internet Explorer 7, and Internet Explorer 8 on
Possible Duplicate: HTTP 404 - File not found Internet Explorer V6 I was testing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.