setData

fun setData(format: String, data: String)(source)

The DataTransfer.setData() method sets the drag operation's drag data to the specified data and type.

MDN Reference