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

Function keydown

src/aria/listbox/listbox.spec.ts:25–34  ·  view source on GitHub ↗
(key: string, modifierKeys: ModifierKeys = {})

Source from the content-addressed store, hash-verified

23 let optionElements: HTMLElement[];
24
25 const keydown = async (key: string, modifierKeys: ModifierKeys = {}) => {
26 listboxElement.dispatchEvent(
27 new KeyboardEvent('keydown', {
28 key,
29 bubbles: true,
30 ...modifierKeys,
31 }),
32 );
33 await fixture.whenStable();
34 };
35
36 const click = async (index: number, eventInit?: PointerEventInit, targets?: HTMLElement[]) => {
37 (targets || optionElements)[index].dispatchEvent(

Callers 10

spaceFunction · 0.70
enterFunction · 0.70
upFunction · 0.70
downFunction · 0.70
leftFunction · 0.70
rightFunction · 0.70
homeFunction · 0.70
endFunction · 0.70
typeFunction · 0.70
listbox.spec.tsFile · 0.70

Calls 1

dispatchEventMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…