From a7e91b2956bac0d09c7feded05da065f11c276a2 Mon Sep 17 00:00:00 2001 From: Rafael Weinstein Date: Mon, 17 Mar 2014 16:45:57 -0700 Subject: [PATCH] fix dom stubs --- benchmark/dom.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/benchmark/dom.js b/benchmark/dom.js index a628136..03b6bf4 100644 --- a/benchmark/dom.js +++ b/benchmark/dom.js @@ -71,8 +71,9 @@ Node.prototype = { }, removeChild: function(node) { - if (node.parentNode != this) - return; + if (node.parentNode != this) { + throw Error('NotFoundError'); + } if (!node.previousSibling && !node.nextSibling) { this.firstChild = null; this.lastChild = null; @@ -90,6 +91,8 @@ Node.prototype = { node.parentNode = null; node.previousSibling = null; node.nextSibling = null; + + return node; }, insertBefore: function(node, otherNode) { if (node.parentNode) @@ -405,4 +408,4 @@ function HTMLBaseElement(owner, tagName) { } HTMLBaseElement.prototype = { __proto__: HTMLElement.prototype -}; \ No newline at end of file +};