diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js index 1dc8cd45f..8ca1fcb04 100755 --- a/core/modules/utils/fakedom.js +++ b/core/modules/utils/fakedom.js @@ -49,6 +49,13 @@ Object.defineProperty(TW_Element.prototype, "nodeType", { } }); +TW_Element.prototype.getAttribute = function(name) { + if(this.isRaw) { + throw "Cannot getAttribute on a raw TW_Element"; + } + return this.attributes[name]; +}; + TW_Element.prototype.setAttribute = function(name,value) { if(this.isRaw) { throw "Cannot setAttribute on a raw TW_Element";