DataTransferItemList

The DataTransferItemList object is a list of DataTransferItem objects representing items being dragged.

MDN Reference

Properties

Link copied to clipboard
open override val length: Int

The read-only length property of the the drag item list.

Functions

Link copied to clipboard

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

The DataTransferItemList.add() method creates a new list.

Link copied to clipboard
fun clear()

The DataTransferItemList method clear() removes all DataTransferItem objects from the drag data items list, leaving the list empty.

Link copied to clipboard
open operator fun get(index: Int): DataTransferItem
open operator fun get(key: Symbol.iterator): () -> JsIterator<DataTransferItem>
Link copied to clipboard
open inline operator fun iterator(): Iterator<DataTransferItem>
Link copied to clipboard
fun remove(index: Int)

The DataTransferItemList.remove() method removes the less than zero or greater than one less than the length of the list, the list will not be changed.