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

Function createClickEvent

src/aria/private/tree/tree.spec.ts:36–46  ·  view source on GitHub ↗
(element: HTMLElement, mods?: ModifierKeys)

Source from the content-addressed store, hash-verified

34const shift = () => createKeyboardEvent('keydown', 16, 'Shift', {shift: true});
35
36function createClickEvent(element: HTMLElement, mods?: ModifierKeys): PointerEvent {
37 return {
38 target: element,
39 shiftKey: mods?.shift,
40 ctrlKey: mods?.control,
41 metaKey: mods?.meta,
42 button: 0,
43 preventDefault: () => {},
44 stopPropagation: () => {},
45 } as unknown as PointerEvent;
46}
47
48function createTreeItemElement(id: string): HTMLElement {
49 const element = document.createElement('div');

Callers 1

tree.spec.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected