MCPcopy Create free account
hub / github.com/UI5/webcomponents / getTabInStrip

Function getTabInStrip

packages/main/src/TabContainer.ts:1540–1550  ·  view source on GitHub ↗
(el: HTMLElement | null)

Source from the content-addressed store, hash-verified

1538const isTabInStrip = (el: HTMLElement) => el.localName === "div" && el.getAttribute("role") === "tab";
1539
1540const getTabInStrip = (el: HTMLElement | null) => {
1541 while (el) {
1542 if (isTabInStrip(el)) {
1543 return el as TabInStrip;
1544 }
1545
1546 el = el.parentElement;
1547 }
1548
1549 return false;
1550};
1551
1552const _walk = (items: Array<ITab>, callback: (arg0: ITab, arg1: number) => void, level: number) => {
1553 [...items].forEach(item => {

Callers 6

_onHeaderFocusinMethod · 0.85
_onTabStripClickMethod · 0.85
_onTabStripKeyDownMethod · 0.85
_onTabStripKeyUpMethod · 0.85
_getPopoverOwnerMethod · 0.85

Calls 1

isTabInStripFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…