getType

external fun <T : Any> getType(type: T): Promise<Any>(source)

Resolves with the payload for the given MIME type. Modeled after the W3C ClipboardItem.getType method. The promise resolves to a Blob for most MIME types; the one exception is getType('electron application/bookmark'), which resolves to a ClipboardBookmark object instead. Rejects when type is not present in clipboardItem.types.


external fun getType(bookmark: String): Promise<ClipboardBookmark>(source)

Resolves with a ClipboardBookmark when a bookmark is available in the clipboard. Rejects when a bookmark is not available in the clipboard.