Package-level declarations

Types

Link copied to clipboard
open class Clipboard : EventTarget

The Clipboard interface of the Clipboard API provides read and write access to the contents of the system clipboard. This allows a web application to implement cut, copy, and paste features. Available only in secure contexts.

Link copied to clipboard
open class ClipboardEvent(val type: EventType<ClipboardEvent>, init: ClipboardEventInit = definedExternally) : Event

The ClipboardEvent interface of the Clipboard API represents events providing information related to modification of the clipboard, that is cut, copy, and paste events.

Link copied to clipboard
Link copied to clipboard
open class ClipboardItem(items: ReadonlyRecord<JsString, JsAny>, options: ClipboardItemOptions = definedExternally)

The ClipboardItem interface of the Clipboard API represents a single item of data copied to, or read from, the clipboard, used with Clipboard.write() and Clipboard.read() respectively. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
val PresentationStyle.Companion.attachment: PresentationStyle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val PresentationStyle.Companion.inline: PresentationStyle
Link copied to clipboard
Link copied to clipboard
val PresentationStyle.Companion.unspecified: PresentationStyle

Functions

Link copied to clipboard
inline suspend fun ClipboardItem.getType(type: String): Blob

The getType() method of the ClipboardItem interface returns a Promise that resolves with a Blob of the requested MIME type or an error if the MIME type is not found.

Link copied to clipboard
inline suspend fun Clipboard.read(): ClipboardItems

The read() method of the Clipboard interface returns a Promise that fulfills with a copy of the clipboard's contents.

Link copied to clipboard
inline suspend fun Clipboard.readText(): String

The readText() method of the Clipboard interface returns a Promise which fulfills with a copy of the textual contents of the system clipboard.

Link copied to clipboard
inline suspend fun Clipboard.write(data: ClipboardItems)

The write() method of the Clipboard interface is used to write data such as images, text, and custom types, to the system clipboard.

Link copied to clipboard
inline suspend fun Clipboard.writeText(data: String)

The writeText() method of the Clipboard interface writes the specified text to the system clipboard, returning a Promise that is resolved once the system clipboard has been updated.