Determine what is being dragged from dragenter & dragover events

前端 未结 9 1957
梦毁少年i
梦毁少年i 2020-12-04 17:35

I\'m trying to use the HTML5 draggable API (though I realize it has its problems). So far, the only showstopper I\'ve encountered is that I can\'t figure out a way to determ

9条回答
  •  清歌不尽
    2020-12-04 17:59

    From what I have read on MDN, what you are doing is correct.

    MDN lists some recommended drag types, such as text/html, but if none are suitable then just store the id as text using the 'text/html' type, or create your own type, such as 'application/node-id'.

提交回复
热议问题