-
Notifications
You must be signed in to change notification settings - Fork 0
/
DragEvent.cljs
40 lines (28 loc) · 1.21 KB
/
DragEvent.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
(ns web.drag.DragEvent
"The DragEvent interface is a `DOM event` that represents a drag
drop interaction. The user initiates a drag by placing a pointer
(such as a mouse) on the touch surface and then dragging the
to a new location (such as another DOM element). Applications
free to interpret a drag and drop interaction in an application-specific"
(:refer-clojure :exclude []))
(def constructor
"Constructor.
This constructor is used to create a synthetic `web.drag.DragEvent` object.
See also: `https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent`"
js/DragEvent)
(defn data-transfer
"Property.
The DragEvent.dataTransfer property holds the drag operation's
(as a `web.drag.DataTransfer` object).
`var data = dragEvent.dataTransfer;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/dataTransfer`"
[this]
(-> this (.-dataTransfer)))
(defn set-data-transfer!
"Property.
The DragEvent.dataTransfer property holds the drag operation's
(as a `web.drag.DataTransfer` object).
`var data = dragEvent.dataTransfer;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/dataTransfer`"
[this val]
(aset this "dataTransfer" val))