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

Function click

src/aria/toolbar/toolbar.spec.ts:33–39  ·  view source on GitHub ↗
(element: HTMLElement, eventInit?: PointerEventInit)

Source from the content-addressed store, hash-verified

31 };
32
33 const click = async (element: HTMLElement, eventInit?: PointerEventInit) => {
34 element.dispatchEvent(
35 // Include pointerType to better simulate a real mouse click v.s. enter keyboard event.
36 new PointerEvent('click', {bubbles: true, pointerType: 'mouse', ...eventInit}),
37 );
38 await fixture.whenStable();
39 };
40
41 const right = async (target?: HTMLElement, modifierKeys?: {}) =>
42 await keydown('ArrowRight', target, modifierKeys);

Callers 1

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…