IE8: expected identifier, string or number

I get an error Expected identifier, string or numberin IE8 with the referring to line 17 character 21following code:

define(
    [
        "underscore"
    ,   "Backbone"
    ,   "text!assetListingTemplate"
    ]
,   function(_, Backbone, template) {
        "use strict";

        var tmpl = _.template(template);
        var AssetListing = Backbone.View.extend({
            tagName: "li"

        ,   attributes: function() {
                return {
                    id: this.model.cid
                ,   class: this.model.get("type")
                };
            }

        ,   render: function() {
                this.el.innerHTML = tmpl(this.model.attributes);
                return this.el;
            }
        });

        return AssetListing;
    }
);

What is:

,   class: this.model.get("type")

This error is usually related to the final coma in Objector similar minor formatting problems that IE does not handle gracefully. I may have looked at the code for too long, but I don’t see such problems here, even JSLinted , and he could not find any questions except to disagree with my style.

The error is not this.model, because it still occurs if I replace all instances of it for regular lines.

Can any eye of an eagle determine what is going wrong here?

+3
source share
1

class, ECMAScript2

class "class"

attributes: function() {
                return {
                    id: this.model.cid
                ,   "class": this.model.get("type")
                };
            }
+3

All Articles