ClipboardItem

open class ClipboardItem(items: ReadonlyRecord<JsString, JsAny>, options: ClipboardItemOptions = definedExternally)(source)

The ClipboardItem interface of the Clipboard API represents a single item format, used when reading or writing clipboard data using Clipboard.read() and Clipboard.write() respectively. Available only in secure contexts.

MDN Reference

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The read-only presentationStyle property of the ClipboardItem interface returns a string indicating how an item should be presented.

Link copied to clipboard

The read-only types property of the ClipboardItem interface returns an Array of MIME type available within the ClipboardItem.

Functions

Link copied to clipboard
suspend fun 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