From 9c3024fe7eb7cd985eddd2d9ec833ae2c1619ada Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 1 Apr 2019 23:23:50 +0200 Subject: [PATCH] Add missing `hasChildNodes` polyfill to `domstubs.js` (PR 10022 follow-up) --- examples/node/domstubs.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/node/domstubs.js b/examples/node/domstubs.js index 8671022e8..9c671aae4 100644 --- a/examples/node/domstubs.js +++ b/examples/node/domstubs.js @@ -101,6 +101,10 @@ DOMElement.prototype = { } }, + hasChildNodes: function DOMElement_hasChildNodes() { + return this.childNodes.length !== 0; + }, + cloneNode: function DOMElement_cloneNode() { var newNode = new DOMElement(this.nodeName); newNode.childNodes = this.childNodes;