Skip to content
Sheetwrite

@sheetwrite/core

ClipboardOutcometype

Report a problem

On this page

How a clipboard action ended. Permission failures are OUTCOMES, not exceptions: the returned promise never rejects.

  • "done" — the action completed.
  • "unsupported" — the Clipboard API (or the needed method) is absent, e.g. a non-secure context or Firefox readText.
  • "blocked" — the browser rejected the request, typically a permissions policy or missing user activation.
  • "empty" — nothing to act on (no focused selection, empty clipboard, or a read-only grid on paste), or the action stopped without a change to the grid because a newer action of the same kind (copy or cut, paste) started or the grid was destroyed first.
  • "rejected" — the grid refused the paste's change, so nothing was pasted: a protected range, a host's admission, a document limit, or a clipboard with more rows, columns, cells or text than a paste may have. The grid says why, beside the mutation-rejected event for a change.

Declaration

export type ClipboardOutcome =
"done" | "unsupported" | "blocked" | "empty" | "rejected";

Referenced by

Public exports naming ClipboardOutcome