What format (MIME Type) should I use for HTML5 drag and drop operations?

前端 未结 3 886
你的背包
你的背包 2020-12-30 00:43

I\'m starting to experiment with HTML5 Drag and Drop. Then, in the dragstart event handler we should run setData(), which receives two parameters: format

3条回答
  •  悲哀的现实
    2020-12-30 00:53

    The HTML5 specification has some drag and drop examples (see the current working draft or the latest version). In such examples, a custom MIME Type is used, and the use of site-specific MIME types is also suggested. See this snippet:

    Drop your favorite fruits below:

      <-- don't forget to change the "text/x-example" type to something specific to your site -->
提交回复
热议问题