/
ScreenOrientation.cljs
119 lines (82 loc) · 3.46 KB
/
ScreenOrientation.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
113
114
115
116
117
118
(ns web.orientation.ScreenOrientation
"The ScreenOrientation interface of the the Screen Orientation
provides information about the current orientation of the document."
(:refer-clojure :exclude [type]))
(defn lock
"Method.
The lock() property of the `web.orientation.ScreenOrientation`
locks the orientation of the containing document to its default
`ScreenOrientation.lock(orientation)`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/lock`"
[this orientation]
(-> this (.lock orientation)))
(defn type
"Property.
The type read-only property of the `web.orientation.ScreenOrientation`
returns the document's current orientation type, one of \\\"portrait-primary\\\",
\\\"landscape-primary\\\", or \\\"landscape-secondary\\\".
`type = ScreenOrientation.type`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/type`"
[this]
(-> this (.type)))
(defn set-type!
"Property.
The type read-only property of the `web.orientation.ScreenOrientation`
returns the document's current orientation type, one of \\\"portrait-primary\\\",
\\\"landscape-primary\\\", or \\\"landscape-secondary\\\".
`type = ScreenOrientation.type`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/type`"
[this val]
(aset this "type" val))
(defn onchange
"Property.
The onchange property of the `web.orientation.ScreenOrientation`
an event handler fired whenever is the `EventHandler` called
the screen changes orientation.
`ScreenOrientation.addEventListener('change', function(e) { ... })
ScreenOrientation.onchange = function(e) { ... }`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/onchange`"
[this]
(-> this (.onchange)))
(defn set-onchange!
"Property.
The onchange property of the `web.orientation.ScreenOrientation`
an event handler fired whenever is the `EventHandler` called
the screen changes orientation.
`ScreenOrientation.addEventListener('change', function(e) { ... })
ScreenOrientation.onchange = function(e) { ... }`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/onchange`"
[this val]
(aset this "onchange" val))
(defn angle
"Property.
The angle read-only property of the `web.orientation.ScreenOrientation`
returns the document's current orientation angle.
`angle = ScreenOrientation.angle`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/angle`"
[this]
(-> this (.angle)))
(defn set-angle!
"Property.
The angle read-only property of the `web.orientation.ScreenOrientation`
returns the document's current orientation angle.
`angle = ScreenOrientation.angle`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/angle`"
[this val]
(aset this "angle" val))
(defn unlock
"Property.
The unlock() property of the `web.orientation.ScreenOrientation`
unlocks the orientation of the containing document from its default
`ScreenOrientation.unlock()`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/unlock`"
[this]
(-> this (.unlock)))
(defn set-unlock!
"Property.
The unlock() property of the `web.orientation.ScreenOrientation`
unlocks the orientation of the containing document from its default
`ScreenOrientation.unlock()`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/unlock`"
[this val]
(aset this "unlock" val))