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

Method constructor

src/aria/menu/menu-trigger.ts:93–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91 });
92
93 constructor() {
94 effect(() => this.menu()?.parent.set(this));
95 effect(() => this._pattern.pendingFocusEffect());
96
97 // Automatically prevent form submission.
98 if (this.element.tagName === 'BUTTON' && !this.element.hasAttribute('type')) {
99 this.element.setAttribute('type', 'button');
100 }
101 }
102
103 /** Opens the menu focusing on the first menu item. */
104 open() {

Callers

nothing calls this directly

Calls 3

setMethod · 0.80
menuMethod · 0.45
pendingFocusEffectMethod · 0.45

Tested by

no test coverage detected