MCPcopy Index your code
hub / github.com/angular/components / _originatesFromChip

Method _originatesFromChip

src/material/chips/chip-set.ts:215–225  ·  view source on GitHub ↗

Checks whether an event comes from inside a chip element.

(event: Event)

Source from the content-addressed store, hash-verified

213
214 /** Checks whether an event comes from inside a chip element. */
215 protected _originatesFromChip(event: Event): boolean {
216 let currentElement = event.target as HTMLElement | null;
217
218 while (currentElement && currentElement !== this._elementRef.nativeElement) {
219 if (currentElement.classList.contains('mat-mdc-chip')) {
220 return true;
221 }
222 currentElement = currentElement.parentElement;
223 }
224 return false;
225 }
226
227 /** Sets up the chip set's focus management logic. */
228 private _setUpFocusManagement() {

Callers 2

_handleKeydownMethod · 0.95
onContainerClickMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected