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

Function createClickEvent

src/aria/private/grid/grid.spec.ts:41–51  ·  view source on GitHub ↗
(element: HTMLElement, mods?: ModifierKeys)

Source from the content-addressed store, hash-verified

39const escape = (mods?: ModifierKeys) => createKeyboardEvent('keydown', 27, 'Escape', mods);
40
41function createClickEvent(element: HTMLElement, mods?: ModifierKeys): PointerEvent {
42 return {
43 target: element,
44 shiftKey: mods?.shift,
45 ctrlKey: mods?.control,
46 metaKey: mods?.meta,
47 button: 0,
48 preventDefault: () => {},
49 stopPropagation: () => {},
50 } as unknown as PointerEvent;
51}
52
53interface TestWidgetData {
54 widgetType?: 'simple' | 'complex' | 'editable';

Callers 1

grid.spec.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected