Expand description
The two hand-offs a backend can perform without a shell around it: saving bytes to a file and putting text on the clipboard. Both are browser affordances rather than application decisions, which is why they live at this level rather than above it.
Functionsยง
- clipboard_
write - Put
texton the system clipboard. The write is asynchronous and its promise is dropped: a clipboard the user denied is not an editing error. - download
- Save
bytesasfile_name: wrap them in a Blob, mint an object URL, and click a detached<a download>, so the browser saves the file straight away rather than offering a link.