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

Function clickMenuItem

src/aria/private/menu/menu.spec.ts:32–38  ·  view source on GitHub ↗
(items: MenuItemPattern<any>[], index: number, mods?: ModifierKeys)

Source from the content-addressed store, hash-verified

30const space = () => createKeyboardEvent('keydown', 32, ' ');
31
32function clickMenuItem(items: MenuItemPattern<any>[], index: number, mods?: ModifierKeys) {
33 return {
34 target: items[index].element(),
35 shiftKey: mods?.shift,
36 ctrlKey: mods?.control,
37 } as unknown as PointerEvent;
38}
39
40function getMenuTriggerPattern(opts?: {textDirection: 'ltr' | 'rtl'}) {
41 const element = signal(document.createElement('button'));

Callers 1

menu.spec.tsFile · 0.85

Calls 1

elementMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…