Algorithm fix: fill "allElements" with only unique elements to improve performance.

This commit is contained in:
Pavel Dymkov
2022-06-24 15:37:38 +03:00
parent 153fe15ed3
commit 012206e4d8

View File

@@ -67,7 +67,7 @@ export function getTabbableBoundary(root: HTMLElement | ShadowRoot) {
}
}
[...el.querySelectorAll('*')].forEach((e: HTMLElement) => walk(e));
[...el.children].forEach((e: HTMLElement) => walk(e));
}
// Collect all elements including the root