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

Method constructor

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

setMethod · 0.80
pendingFocusEffectMethod · 0.80
menuMethod · 0.45

Tested by

no test coverage detected