The DataTransferItemList
object is a list of DataTransferItem
objects representing items being dragged. During a drag operation, each DragEvent
has a dataTransfer
property and that property is a DataTransferItemList
.
This interface has no constructor.
DataTransferItemList.length
Read only
unsigned long
that is the number of drag items in the list.DataTransferItemList.add()
File
object or a string
) to the drag item list and returns a DataTransferItem
object for the new item.DataTransferItemList.remove()
DataTransferItemList.clear()
DataTransferItemList.DataTransferItem()
DataTransferItem
at the given index.Each of this interface's methods and properties has a reference page, and each reference page has an example of its usage.
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'DataTransferItemList' in that specification. | Living Standard | |
HTML 5.1 The definition of 'DataTransferItemList' in that specification. | Recommendation | Not included in W3C HTML5 Recommendation |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 4 | Yes | 50 | No | 12 | 11.1 |
DataTransferItemList[] |
4 | ? | 50 | No | 12 | No |
add |
No | Yes | 50 | No | 12 | No |
clear |
4 | Yes | 50 | No | 12 | No |
length |
4 | Yes | 50 | No | 12 | No |
remove |
4 | Yes | 50 | No | 12 | No |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | No | No | ? | 50 | No | No | ? |
DataTransferItemList[] |
No | No | ? | 50 | No | No | ? |
add |
No | No | ? | 50 | No | No | ? |
clear |
No | No | ? | 50 | No | No | ? |
length |
No | No | Yes | 50 | No | No | ? |
remove |
No | No | Yes | 50 | No | No | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItemList