Wrap DOM iterables in array.
This commit is contained in:
parent
92e82a76c7
commit
1a14719483
1 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||||
|
|
Reference in a new issue