Expand description
The applier behind the clipboard_write and clipboard_read builtins,
running on whichever clipboard backend the app was assembled with.
The applier behind the clipboard_write and clipboard_read builtins.
The backend is whatever [ClipboardHost] the assembly put in the world:
the OS clipboard on the desktop, the page’s navigator.clipboard in a
browser. This applier is the same on both, and an app with no host in the
world still answers every read, with empty text, so a script waiting on
on_clipboard(tag, text) is never left hanging.
Structs§
- Pending
Clipboard Reads - Reads that have an answer and have not been delivered yet.
Functions§
- apply_
clipboard_ commands - Carry out the clipboard commands a script queued, and deliver the reads
that have an answer as
clipboard_read_events. - clipboard_
read_ event - The event one answered
clipboard_read(tag)reaches the script as:on_clipboard(tag, text), with a per-tagon("clipboard", tag, fn)winning. A clipboard holding no text answers with empty text, so a script waiting on the read can still clear its pending state.