Nos bénévoles n'ont pas encore traduit cet article en Français. Inscrivez-vous et aidez-nous à réaliser cette tâche !
Vous pouvez également lire cet article en English (US).

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.

Properties

DataTransferItemList.length Read only
An unsigned long that is the number of drag items in the list.

Methods

DataTransferItemList.add()
Adds an item (either a File object or a string) to the drag item list and returns a DataTransferItem object for the new item.
DataTransferItemList.remove()
Removes the drag item from the list at the given index.
DataTransferItemList.clear()
Removes all of the drag items from the list.
DataTransferItemList.DataTransferItem()
Getter that returns a DataTransferItem at the given index.

Example

Each of this interface's methods and properties has a reference page, and each reference page has an example of its usage.

Specifications

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

Browser compatibility

 

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 4Edge Full support YesFirefox Full support 50IE No support NoOpera Full support 12Safari Full support 11.1WebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 50Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
DataTransferItemList[]Chrome Full support 4Edge ? Firefox Full support 50IE No support NoOpera Full support 12Safari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 50Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
addChrome No support NoEdge Full support YesFirefox Full support 50IE No support NoOpera Full support 12Safari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 50Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
clearChrome Full support 4Edge Full support YesFirefox Full support 50IE No support NoOpera Full support 12Safari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 50Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
lengthChrome Full support 4Edge Full support YesFirefox Full support 50IE No support NoOpera Full support 12Safari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile Full support YesFirefox Android Full support 50Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
removeChrome Full support 4Edge Full support YesFirefox Full support 50IE No support NoOpera Full support 12Safari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile Full support YesFirefox Android Full support 50Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

 

Étiquettes et contributeurs liés au document

Contributeurs à cette page : fscholz, Ehsan, erikadoyle, Sheppy, rolfedh, lian79, AFBarstow
Dernière mise à jour par : fscholz,