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

Function dispatchCopyEvent

front_end/testing/DOMHelpers.ts:220–223  ·  view source on GitHub ↗
(element: T, options: ClipboardEventInit = {})

Source from the content-addressed store, hash-verified

218 * Dispatches a clipboard copy event.
219 */
220export function dispatchCopyEvent<T extends Element>(element: T, options: ClipboardEventInit = {}) {
221 const copyEvent = new ClipboardEvent('copy', options);
222 element.dispatchEvent(copyEvent);
223}
224
225/**
226 * Dispatches a clipboard paste event.

Calls 1

dispatchEventMethod · 0.80

Tested by

no test coverage detected