From 1a1471948357aad18441329a0e78566e128ab5cb Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 7 Jul 2021 14:12:24 -0700 Subject: [PATCH] Wrap DOM iterables in array. --- src/platform/web/HTMLParseResult.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platform/web/HTMLParseResult.js b/src/platform/web/HTMLParseResult.js index 11ef1f0d..72a08ab7 100644 --- a/src/platform/web/HTMLParseResult.js +++ b/src/platform/web/HTMLParseResult.js @@ -4,15 +4,15 @@ export class HTMLParseResult { } get rootNodes() { - return this._bodyNode.childNodes; + return Array.from(this._bodyNode.childNodes); } getChildNodes(node) { - return node.childNodes; + return Array.from(node.childNodes); } getAttributeNames(node) { - return node.getAttributeNames(); + return Array.from(node.getAttributeNames()); } getAttributeValue(node, attr) {