MCPcopy Create free account
hub / github.com/anomalyco/models.dev / onCopy

Function onCopy

packages/web/src/index.ts:629–633  ·  view source on GitHub ↗
(event: ClipboardEvent)

Source from the content-addressed store, hash-verified

627function writeClipboardWithSelection(value: string) {
628 let copied = false;
629 const onCopy = (event: ClipboardEvent) => {
630 event.clipboardData?.setData("text/plain", value);
631 event.preventDefault();
632 copied = true;
633 };
634 const textarea = document.createElement("textarea");
635 textarea.value = value;
636 textarea.setAttribute("readonly", "");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected