Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getTabElements(): Element[] | null {
return [].slice.call(
this.root.ref &&
this.root.ref.querySelectorAll(MDCTabBarFoundation.strings.TAB_SELECTOR)
);
}
getFocusedTabIndex: () => {
const tabElements: Element[] = [].slice.call(
rootEl.ref?.querySelectorAll(
MDCTabBarFoundation.strings.TAB_SELECTOR
)
);
const activeElement = document.activeElement as Element;
return tabElements ? tabElements.indexOf(activeElement) : -1;
},
getIndexOfTabById: (id: string) => {