Skip to content

Clipboard

The system clipboard. It can stall, so it works off the caller’s thread.

Get it with Api.clipboard().

text(): Promise<string>
setText(text: string): Promise<void>

UTF-8, empty if there’s no text. Good till the taking thread takes another.

Async. Fails with ClipboardError.

Async. Fails with ClipboardError.

What can go wrong, besides Cancelled, Unsupported and Gone.

Code Error
1 Failed
2 NotDeclared Its wraith.json doesn’t list “clipboard” in “permissions”

Made with ♥ by Asgard