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

Function openMenuOnHover

src/cdk/menu/menu.spec.ts:170–177  ·  view source on GitHub ↗

Using a fake hover event, open the specified menu given a reference to its trigger.

(menuElement?: HTMLElement)

Source from the content-addressed store, hash-verified

168 }
169 /** Using a fake hover event, open the specified menu given a reference to its trigger. */
170 function openMenuOnHover(menuElement?: HTMLElement) {
171 if (menuElement) {
172 dispatchMouseEvent(menuElement, 'mouseenter');
173 detectChanges();
174 } else {
175 throw Error('No element trigger provided. Is it visible in the DOM?');
176 }
177 }
178
179 /**
180 * Fakes mouse hover events from some source point to some target point. Along the way, emits

Callers 1

menu.spec.tsFile · 0.85

Calls 2

dispatchMouseEventFunction · 0.85
detectChangesFunction · 0.70

Tested by

no test coverage detected