in src/focus/index.ts [71:91]
public find(
root: HTMLElement = this.defaultRoot,
ignore: ReadonlySet<HTMLElement> = new Set(),
): HTMLElement | null {
const options: IFocusOptions = {
previousElement: this.source.activeElement,
...this.source,
direction: this.direction,
ignore,
root,
};
for (const strategy of this.strategies) {
const selection = strategy.findNextFocus(options);
if (selection) {
return selection;
}
}
return null;
}