This constructor is used to create a synthetic
DragEvent
对象。
Although this interface has a constructor, it is not possible to create a useful
DataTransfer
object from script, since
DataTransfer
objects have a processing and security model that is coordinated by the browser during drag-and-drops.
此接口继承特性从
MouseEvent
and
事件
.
event = new DragEvent(type, DragEventInit);
DOMString
representing the name of the event (see
DragEvent event types
).
DragEventInit
字典,拥有以下字段:
"dataTransfer"
, optional and defaults to
"null"
. The type is
DataTransfer
.
DragEventInit
dictionary inherits from the
MouseEventInit dictionary
.
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'DragEvent' in that specification. |
实时标准 | |
|
HTML 5.1
The definition of 'DragEvent' in that specification. |
推荐 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
DragEvent()
构造函数
|
Chrome 46 | Edge 12 | Firefox 3.5 | IE 10 | Opera 12 | Safari 3.1 | WebView Android No | Chrome Android No | Firefox Android Yes | Opera Android No | Safari iOS No | Samsung Internet Android No |
完整支持
不支持
DragEvent
DragEvent()