Why the OS clipboard was not used by the last call, or null when it was. Set on a successful copy too, when the payload reached memory but not the system clipboard: that copy works in this tab and will not appear in another, which is exactly what a host wants to be able to tell the user.
Read drawings back, or null when there is nothing of ours to paste. The system clipboard wins when it holds our payload, so a copy made in another tab beats a stale in-tab one; memory is consulted when the read fails or returns something that is not ours. That last case can paste an older copy after the user has copied unrelated text elsewhere, which is the deliberate trade: losing the copy whenever a browser refuses the read half of the permission would be the worse surprise.
Swap the port at runtime (a host granting permission later, or a test).
Write drawings out. Resolves true when the payload is retrievable by a
later read() (through the system clipboard, or through memory when the
fallback is on), false when it is not, so a caller doing a cut knows
whether it is safe to delete the original.
The clipboard as the controller sees it: drawings in, drawings out, no exceptions escaping. Every failure mode (no clipboard API, refused permission, foreign text, corrupt payload) reduces to
falseornull.