chore: rename serializeTree parameter (#6308)

This commit is contained in:
Johan Bay 2020-08-05 17:08:19 +02:00 committed by GitHub
parent 1d08e274a8
commit 8e29b7a38d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,13 +208,13 @@ export class Accessibility {
private serializeTree(
node: AXNode,
whitelistedNodes?: Set<AXNode>
interestingNodes?: Set<AXNode>
): SerializedAXNode[] {
const children: SerializedAXNode[] = [];
for (const child of node.children)
children.push(...this.serializeTree(child, whitelistedNodes));
children.push(...this.serializeTree(child, interestingNodes));
if (whitelistedNodes && !whitelistedNodes.has(node)) return children;
if (interestingNodes && !interestingNodes.has(node)) return children;
const serializedNode = node.serialize();
if (children.length) serializedNode.children = children;