MCPcopy
hub / github.com/angular/components / isOpen

Method isOpen

src/aria/menu/testing/menu-harness.ts:105–112  ·  view source on GitHub ↗

Checks whether the menu container is visible.

()

Source from the content-addressed store, hash-verified

103
104 /** Checks whether the menu container is visible. */
105 async isOpen(): Promise<boolean> {
106 const host = await this.host();
107 // Menu bars are always visible persistently.
108 if (await host.matchesSelector('[ngMenuBar]')) {
109 return true;
110 }
111 return (await host.getAttribute('data-visible')) === 'true';
112 }
113
114 /** Whether the menu is a menu bar. */
115 async isMenuBar(): Promise<boolean> {

Callers 14

openMethod · 0.95
closeMethod · 0.95
_openMethod · 0.45
isMenuOpenMethod · 0.45
toggleMethod · 0.45
openMethod · 0.45
closeMethod · 0.45

Calls 2

matchesSelectorMethod · 0.65
getAttributeMethod · 0.65

Tested by

no test coverage detected