Clipboard

spec.Clipboard (Interface) → backend.Clipboard

Backend interface for system clipboard operations.

This interface provides access to the platform's clipboard for copy/paste functionality. Currently supports text-only operations, though backends may extend this for other data types.

Clipboard access may require permissions on some platforms (e.g., web browsers) and operations may fail silently if permissions are not granted.

Instance Members

getText(): String

Gets the current text content from the system clipboard.

Returns Description
String The clipboard text content, or an empty string if the clipboard is empty or doesn't contain text data

setText(text: String): Void

Sets text content to the system clipboard. This replaces any existing clipboard content.

Name Type Description
text String The text to copy to the clipboard