Ember.js 1.10 - Failed to execute 'setAttribute' in 'Element': '"' is not a valid attribute name

After upgrading from Ember.js from 1.9 to 1.10, I received the following error:

Uncaught InvalidCharacterError: Failed to execute 'setAttribute' in 'Element': '"' is not a valid attribute name.

prototype.setAttribute = function(element, name, value) {
    element.setAttribute(name, String(value));
};

Values:

value: "" 
name: """ 
element: <span></span>

What is the easiest way to find out what problem may occur during the upgrade and what needs to be fixed? The error is not very user friendly.

+4
source share
1 answer

Troubleshooting steps:

  • Open the compiled template (in my case it was in stacktrace VM.js: XXXX).
  • .

var el1 = dom.createElement("span");
dom.setAttribute(el1,"\"","");
dom.appendChild(el0, el1);
  1. , .

.

<span {{action "setUrgency" urgentItem.urgency}} {{bind-attr class=urgentItem.styleClass}}"></span>
  1. ( ).

(HTMLBars ), . , .

+6

All Articles