add

fun add(data: String, type: String): DataTransferItem?(source)

Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also.

MDN Reference