DataTransfer
Defined in: api/node/rust-module.d.cts:76
Represents some form of type-indexed possibly-lazy data transfer.
Used for accessing the platform clipboard and drag-and-drop APIs.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DataTransfer():
DataTransfer
Defined in: api/node/rust-module.d.cts:78
Constructs an empty DataTransfer.
Returns
Section titled “Returns”DataTransfer
Accessors
Section titled “Accessors”hasImage
Section titled “hasImage”Get Signature
Section titled “Get Signature”get hasImage():
boolean
Defined in: api/node/rust-module.d.cts:102
true if this DataTransfer advertises an image representation.
Returns
Section titled “Returns”boolean
hasPlaintext
Section titled “hasPlaintext”Get Signature
Section titled “Get Signature”get hasPlaintext():
boolean
Defined in: api/node/rust-module.d.cts:90
true if this DataTransfer advertises a plaintext representation.
Returns
Section titled “Returns”boolean
userData
Section titled “userData”Get Signature
Section titled “Get Signature”get userData():
unknown
Defined in: api/node/rust-module.d.cts:114
Application-internal user data attached to this DataTransfer. Use this
when the drag-and-drop or clipboard operation stays inside the current
JavaScript application and you want to avoid serializing to plaintext or
an image.
Reading returns the JavaScript value previously assigned, or null if
none was set (or the user data was set by a non-JavaScript binding).
Assigning null or undefined clears any previously attached JS user
data.
Returns
Section titled “Returns”unknown
Set Signature
Section titled “Set Signature”set userData(
value):void
Defined in: api/node/rust-module.d.cts:115
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
Methods
Section titled “Methods”equals()
Section titled “equals()”equals(
other):boolean
Defined in: api/node/rust-module.d.cts:122
Returns true if this DataTransfer equals other. Two transfers
compare equal when one is an unmodified clone of the other; any
modification (including overwriting plaintext, image, or user data with
the same value) makes them unequal.
Parameters
Section titled “Parameters”DataTransfer
Returns
Section titled “Returns”boolean
fetchImage()
Section titled “fetchImage()”fetchImage():
SlintImageData|null
Defined in: api/node/rust-module.d.cts:100
Returns the image representation of this DataTransfer, or null if no
image is available.
Returns
Section titled “Returns”SlintImageData | null
fetchPlaintext()
Section titled “fetchPlaintext()”fetchPlaintext():
string|null
Defined in: api/node/rust-module.d.cts:88
Returns the plaintext representation of this DataTransfer, or null if no
plaintext is available.
Returns
Section titled “Returns”string | null
setImage()
Section titled “setImage()”setImage(
image):void
Defined in: api/node/rust-module.d.cts:95
Sets the image representation of this DataTransfer. Calling this again
overwrites the previous image.
Parameters
Section titled “Parameters”SlintImageData
Returns
Section titled “Returns”void
setPlaintext()
Section titled “setPlaintext()”setPlaintext(
text):void
Defined in: api/node/rust-module.d.cts:83
Sets the plaintext representation of this DataTransfer. Calling this again
overwrites the previous plaintext.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
© 2026 SixtyFPS GmbH