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() {
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) {