The DataTransferItemList.add()
method creates a new list.
The DataTransferItemList method clear()
removes all DataTransferItem objects from the drag data items list, leaving the list empty.
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.
The
DataTransferItemList
object is a list of DataTransferItem objects representing items being dragged.MDN Reference