MCPcopy Create free account
hub / github.com/angular/components / _getItem

Method _getItem

src/aria/private/tabs/tabs.ts:298–305  ·  view source on GitHub ↗

Returns the tab item associated with the given pointer event.

(e: PointerEvent)

Source from the content-addressed store, hash-verified

296
297 /** Returns the tab item associated with the given pointer event. */
298 private _getItem(e: PointerEvent) {
299 if (!(e.target instanceof HTMLElement)) {
300 return;
301 }
302
303 const element = e.target.closest('[role="tab"]');
304 return this.inputs.items().find(i => i.element() === element);
305 }
306}

Callers 1

TabListPatternClass · 0.95

Calls 1

elementMethod · 0.45

Tested by

no test coverage detected