ClipboardItem extension type
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.
The benefit of having the ClipboardItem
interface to represent data,
is that it enables developers to cope with the varying scope of file types
and data.
Note: To work with text see the Clipboard.readText and Clipboard.writeText methods of the Clipboard interface.
API documentation sourced from MDN Web Docs.
- on
- Implemented types
- Available extensions
Constructors
- ClipboardItem(JSObject items, [ClipboardItemOptions options])
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- presentationStyle → PresentationStyle
-
The read-only
presentationStyle
property of the ClipboardItem interface returns a string indicating how an item should be presented.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
types
→ JSArray<
JSString> -
The read-only
types
property of the ClipboardItem interface returns anArray
of available within the ClipboardItemno setter
Methods
-
getType(
String type) → JSPromise< Blob> -
The
getType()
method of the ClipboardItem interface returns aPromise
that resolves with a Blob of the requested or an error if the MIME type is not found. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
supports(
String type) → bool -
The
supports()
static method of the ClipboardItem interface returnstrue
if the given is supported by the clipboard, andfalse
otherwise.