diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js index 85f57a503..5175cebc5 100755 --- a/core/modules/utils/fakedom.js +++ b/core/modules/utils/fakedom.js @@ -23,7 +23,7 @@ var bumpSequenceNumber = function(object) { var TW_TextNode = function(text) { bumpSequenceNumber(this); - this.textContent = text; + this.textContent = text + ""; }; Object.defineProperty(TW_TextNode.prototype, "nodeType", { @@ -66,7 +66,7 @@ TW_Element.prototype.setAttribute = function(name,value) { if(this.isRaw) { throw "Cannot setAttribute on a raw TW_Element"; } - this.attributes[name] = value; + this.attributes[name] = value + ""; }; TW_Element.prototype.setAttributeNS = function(namespace,name,value) { @@ -139,7 +139,7 @@ Object.defineProperty(TW_Element.prototype, "className", { return this.attributes["class"] || ""; }, set: function(value) { - this.attributes["class"] = value; + this.attributes["class"] = value + ""; } }); @@ -148,7 +148,7 @@ Object.defineProperty(TW_Element.prototype, "value", { return this.attributes.value || ""; }, set: function(value) { - this.attributes.value = value; + this.attributes.value = value + ""; } });