in src/components/arc-exclude.tsx [20:44]
public componentDidMount() {
const element = ReactDOM.findDOMNode(this);
if (!(element instanceof HTMLElement)) {
throw new Error(
`Attempted to mount an <ArcScope /> not attached to an element, got ${element}`,
);
}
instance.getServices().stateContainer.add(this, {
element,
onIncoming: ev => {
if (!ev.next || this.props.active === false) {
return;
}
const exclusions = new Set<HTMLElement>();
while (this.isElementExcluded(ev.next)) {
exclusions.add(ev.next!);
ev.next = ev.focusContext.find(undefined, exclusions);
}
},
});
this.node = element;
}