Merge pull request #10706 from Snuffleupagus/domstubs-hasChildNodes

Add missing `hasChildNodes` polyfill to `domstubs.js` (PR 10022 follow-up)
This commit is contained in:
Tim van der Meij 2019-04-01 23:57:58 +02:00 committed by GitHub
commit 5498b19108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;