HTML5 Drag and Drop getData() only works on drop event in Chrome?

前端 未结 2 1047
一生所求
一生所求 2020-12-30 23:56

I\'m currently working on a project at work using the HTML5 Drag and Drop API to provide added functionality including dragging items in and out of browsers. I am currently

2条回答
  •  感情败类
    2020-12-31 00:31

    Referencing this answer:

    The data is only available on drop, this is a security feature since a website could grab data when you happen to be dragging something across the webpage.

提交回复
热议问题