-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProgressEvent.cljs
113 lines (81 loc) · 3.93 KB
/
ProgressEvent.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
(ns web.other.ProgressEvent
"The ProgressEvent interface represents events measuring progress
an underlying process, like an HTTP request (for an XMLHttpRequest,
the loading of the underlying resource of an `<img>`, `<audio>`,
`<style>` or `<link>`)."
(:refer-clojure :exclude []))
(def constructor
"Constructor.
The ProgressEvent() constructor returns a newly created `web.other.ProgressEvent`, representing the current completion of a long process.
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/ProgressEvent`"
js/ProgressEvent)
(defn init-progress-event
"Method.
The ProgressEvent.initProgressEvent() method Initializes an animation
created using the deprecated `Document.createEvent(\\\"ProgressEvent\\\")`
`Progress.initProgressEvent(typeArg, canBubbleArg, cancelableArg, lengthComputable, loaded, total);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/initProgressEvent`"
[this type-arg can-bubble-arg cancelable-arg length-computable loaded total]
(-> this (.initProgressEvent type-arg can-bubble-arg cancelable-arg length-computable loaded total)))
(defn length-computable
"Property.
The ProgressEvent.lengthComputable read-only property is a `js.Boolean`
indicating if the resource concerned by the `web.other.ProgressEvent`
a length that can be calculated. If not, the `ProgressEvent.total`
has no significant value.
`flag = ProgressEvent.lengthComputable`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/lengthComputable`"
[this]
(-> this (.-lengthComputable)))
(defn set-length-computable!
"Property.
The ProgressEvent.lengthComputable read-only property is a `js.Boolean`
indicating if the resource concerned by the `web.other.ProgressEvent`
a length that can be calculated. If not, the `ProgressEvent.total`
has no significant value.
`flag = ProgressEvent.lengthComputable`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/lengthComputable`"
[this val]
(aset this "lengthComputable" val))
(defn loaded
"Property.
The ProgressEvent.loaded read-only property is an integer representing
amount of work already performed by the underlying process. The
of work done can be calculated with the property and ProgressEvent.total.
downloading a resource using HTTP, this only represent the part
the content itself, not headers and other overhead.
`value = ProgressEvent.loaded`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/loaded`"
[this]
(-> this (.-loaded)))
(defn set-loaded!
"Property.
The ProgressEvent.loaded read-only property is an integer representing
amount of work already performed by the underlying process. The
of work done can be calculated with the property and ProgressEvent.total.
downloading a resource using HTTP, this only represent the part
the content itself, not headers and other overhead.
`value = ProgressEvent.loaded`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/loaded`"
[this val]
(aset this "loaded" val))
(defn total
"Property.
The ProgressEvent.total read-only property is an integer representing
total amount of work that the underlying process is in the progress
performing. When downloading a resource using HTTP, this only
the content itself, not headers and other overhead.
`value = ProgressEvent.total`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/total`"
[this]
(-> this (.-total)))
(defn set-total!
"Property.
The ProgressEvent.total read-only property is an integer representing
total amount of work that the underlying process is in the progress
performing. When downloading a resource using HTTP, this only
the content itself, not headers and other overhead.
`value = ProgressEvent.total`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/total`"
[this val]
(aset this "total" val))