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

Function isElementInsideMenuStack

src/cdk/menu/menu-trigger-base.ts:174–181  ·  view source on GitHub ↗

* Whether the given element is inside the scope of this trigger's menu stack. * @param element The element to check. * @return Whether the element is inside the scope of this trigger's menu stack.

(element: Element)

Source from the content-addressed store, hash-verified

172 * @return Whether the element is inside the scope of this trigger's menu stack.
173 */
174 protected isElementInsideMenuStack(element: Element) {
175 for (let el: Element | null = element; el; el = el?.parentElement ?? null) {
176 if (el.getAttribute('data-cdk-menu-stack-id') === this.menuStack.id) {
177 return true;
178 }
179 }
180 return false;
181 }
182
183 /** Destroy and unset the overlay reference it if exists */
184 private _destroyOverlay() {

Callers

nothing calls this directly

Calls 1

getAttributeMethod · 0.65

Tested by

no test coverage detected