diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js index 590a7ffe0..d28161ac6 100755 --- a/core/modules/utils/fakedom.js +++ b/core/modules/utils/fakedom.js @@ -42,7 +42,7 @@ var TW_TextNode = function(text) { this.textContent = text + ""; }; -TW_TextNode.prototype = Object.create(TW_Node.prototype); +Object.setPrototypeOf(TW_TextNode,TW_Node.prototype); Object.defineProperty(TW_TextNode.prototype, "nodeType", { get: function() { @@ -67,7 +67,7 @@ var TW_Element = function(tag,namespace) { this.namespaceURI = namespace || "http://www.w3.org/1999/xhtml"; }; -TW_Element.prototype = Object.create(TW_Node.prototype); +Object.setPrototypeOf(TW_Element,TW_Node.prototype); Object.defineProperty(TW_Element.prototype, "style", { get: function() {