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

Function keydown

src/aria/toolbar/toolbar.spec.ts:21–31  ·  view source on GitHub ↗
(key: string, target?: HTMLElement, modifierKeys: {} = {})

Source from the content-addressed store, hash-verified

19 let toolbarElement: HTMLElement;
20
21 const keydown = async (key: string, target?: HTMLElement, modifierKeys: {} = {}) => {
22 const eventTarget = target || toolbarElement;
23 eventTarget.dispatchEvent(
24 new KeyboardEvent('keydown', {
25 key,
26 bubbles: true,
27 ...modifierKeys,
28 }),
29 );
30 await fixture.whenStable();
31 };
32
33 const click = async (element: HTMLElement, eventInit?: PointerEventInit) => {
34 element.dispatchEvent(

Callers 7

rightFunction · 0.70
leftFunction · 0.70
upFunction · 0.70
downFunction · 0.70
homeFunction · 0.70
endFunction · 0.70
toolbar.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…