w3c / input-events

Input Events
https://w3c.github.io/input-events/
Other
24 stars 16 forks source link

dataTransfer spec is weird #7

Closed domenic closed 8 years ago

domenic commented 8 years ago

This is mostly an editorial issue; I think implementers can probably figure out what you mean. But the way the spec is written:

dataTransfer.getData('text/html') returns a HTML representation of the content that is to be cut, copied, pasted, dragged, dropped or added.

it seems to imply you're overwriting the getData method in some way.

The proper way to layer this is to say that the event is created with an associated DataTransfer object, whose drag data store item list contains certain entries. Then, the dataTransfer attribute will return the associated DataTransfer object.