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

Method _getItem

src/aria/private/tabs/tabs.ts:299–307  ·  view source on GitHub ↗

Returns the tab item associated with the given pointer event.

(e: PointerEvent)

Source from the content-addressed store, hash-verified

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

Callers 1

TabListPatternClass · 0.95

Calls 2

_getEventTargetFunction · 0.90
elementMethod · 0.45

Tested by

no test coverage detected