DataTransferItemList - Web APIs 编辑
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 astring
) to the drag item list and returns aDataTransferItem
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
BCD tables only load in the browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论