MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / dispatchClickEvent

Function dispatchClickEvent

front_end/testing/DOMHelpers.ts:147–150  ·  view source on GitHub ↗
(element: T, options: MouseEventInit = {})

Source from the content-addressed store, hash-verified

145 * Dispatches a mouse click event.
146 */
147export function dispatchClickEvent<T extends Element>(element: T, options: MouseEventInit = {}) {
148 const clickEvent = new MouseEvent('click', options);
149 element.dispatchEvent(clickEvent);
150}
151
152export function dispatchMouseUpEvent<T extends Element>(element: T, options: MouseEventInit = {}) {
153 const clickEvent = new MouseEvent('mouseup', options);

Calls 1

dispatchEventMethod · 0.80

Tested by 3

testPlaceholderButtonFunction · 0.68
clickClearButtonFunction · 0.68