types
Summary
Returns an array listing the formats that were set in the dragstart event. If any files are being dragged, one of the types will be the string "Files".
Property of dom/DataTransferdom/DataTransfer
Syntax
Note: This property is read-only.
var dragTypes = event.dataTransfer.types;
Return Value
Returns an object of type DOM NodeDOM Node
An array of dragged formats.
Examples
//retrieve array of formats being dragged
function getDragTypes(e) {
var oData = e.dataTransfer;
var dTypes = oData.types;
}
Related specifications
- HTML
- Candidate Recommendation
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]