Wrap DOM iterables in array.

This commit is contained in:
Danila Fedorin 2021-07-07 14:12:24 -07:00
parent 92e82a76c7
commit 1a14719483

View file

@ -4,15 +4,15 @@ export class HTMLParseResult {
} }
get rootNodes() { get rootNodes() {
return this._bodyNode.childNodes; return Array.from(this._bodyNode.childNodes);
} }
getChildNodes(node) { getChildNodes(node) {
return node.childNodes; return Array.from(node.childNodes);
} }
getAttributeNames(node) { getAttributeNames(node) {
return node.getAttributeNames(); return Array.from(node.getAttributeNames());
} }
getAttributeValue(node, attr) { getAttributeValue(node, attr) {