diff --git a/client/js/util/polyfill.js b/client/js/util/polyfill.js index 0bf68a8..1940a26 100644 --- a/client/js/util/polyfill.js +++ b/client/js/util/polyfill.js @@ -16,6 +16,19 @@ NodeList.prototype.querySelector = function(...args) { return null; }; +NodeList.prototype.querySelectorAll = function(...args) { + let result = []; + for (let node of this) { + if (node.nodeType === 3) { + continue; + } + for (let childNode of node.querySelectorAll(...args)) { + result.push(childNode); + } + } + return result; +}; + // non standard Node.prototype.prependChild = function(child) { if (this.firstChild) {