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

Function keydown

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

Source from the content-addressed store, hash-verified

55 let gridInstance: Grid;
56
57 const keydown = async (key: string, modifierKeys: ModifierKeys = {}) => {
58 const event = new KeyboardEvent('keydown', {key, bubbles: true, ...modifierKeys});
59 gridElement.dispatchEvent(event);
60 await fixture.whenStable();
61 };
62
63 const pointerDown = async (target: HTMLElement, eventInit: PointerEventInit = {}) => {
64 target.dispatchEvent(new PointerEvent('click', {bubbles: true, ...eventInit}));

Callers 9

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

Calls 1

dispatchEventMethod · 0.65

Tested by

no test coverage detected