Bug 1683460 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

On second thought, the spec says items.length "Returns the number of items in the drag data store.":
https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitemlist-interface

The MDN page for items says:

"The read-only DataTransfer property items property is a list of the data transfer items in a drag operation. The list includes one item for each item in the operation and if the operation had no items, the list is empty."

https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/items

This api seems rather ambiguous about this.
On second thought, the spec says items.length "Returns the number of items in the drag data store.":
https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitemlist-interface

The MDN page for items says:

"The read-only DataTransfer property items property is a list of the data transfer items in a drag operation. The list includes one item for each item in the operation and if the operation had no items, the list is empty."

https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/items

This api seems rather ambiguous, the naming does not help either.

Back to Bug 1683460 Comment 7