-
Notifications
You must be signed in to change notification settings - Fork 0
/
XPathResult.cljs
215 lines (150 loc) · 6.38 KB
/
XPathResult.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
(ns web.xpath.XPathResult
"The XPathResult interface represents the results generated by
an XPath expression within the context of a given node."
(:refer-clojure :exclude []))
(defn iterate-next
"Method.
The iterateNext() method of the `web.xpath.XPathResult` interface
over a node set result and returns the next node from it or null
there are no more nodes.
`var node = result.iterateNext();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/iterateNext`"
[this ]
(-> this (.iterateNext)))
(defn snapshot-item
"Method.
The snapshotItem() method of the `web.xpath.XPathResult` interface
an item of the snapshot collection or null in case the index
not within the range of nodes. Unlike the iterator result, the
does not become invalid, but may not correspond to the current
if it is mutated.
`var node = result.snapshotItem(i);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/snapshotItem`"
[this i]
(-> this (.snapshotItem i)))
(defn boolean-value
"Property.
The read-only booleanValue property of the `web.xpath.XPathResult`
returns the boolean value of a result with `XPathResult.resultType`
BOOLEAN_TYPE.
`var value = result.booleanValue;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/booleanValue`"
[this]
(-> this (.-booleanValue)))
(defn set-boolean-value!
"Property.
The read-only booleanValue property of the `web.xpath.XPathResult`
returns the boolean value of a result with `XPathResult.resultType`
BOOLEAN_TYPE.
`var value = result.booleanValue;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/booleanValue`"
[this val]
(aset this "booleanValue" val))
(defn invalid-iterator-state
"Property.
The read-only invalidIteratorState property of the `web.xpath.XPathResult`
signifies that the iterator has become invalid. It is true if
is UNORDERED_NODE_ITERATOR_TYPE or ORDERED_NODE_ITERATOR_TYPE
the document has been modified since this result was returned.
`var iteratorState = result.invalidIteratorState;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/invalidIteratorState`"
[this]
(-> this (.-invalidIteratorState)))
(defn set-invalid-iterator-state!
"Property.
The read-only invalidIteratorState property of the `web.xpath.XPathResult`
signifies that the iterator has become invalid. It is true if
is UNORDERED_NODE_ITERATOR_TYPE or ORDERED_NODE_ITERATOR_TYPE
the document has been modified since this result was returned.
`var iteratorState = result.invalidIteratorState;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/invalidIteratorState`"
[this val]
(aset this "invalidIteratorState" val))
(defn number-value
"Property.
The read-only numberValue property of the `web.xpath.XPathResult`
returns the numeric value of a result with `XPathResult.resultType`
NUMBER_TYPE.
`var value = result.numberValue;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/numberValue`"
[this]
(-> this (.-numberValue)))
(defn set-number-value!
"Property.
The read-only numberValue property of the `web.xpath.XPathResult`
returns the numeric value of a result with `XPathResult.resultType`
NUMBER_TYPE.
`var value = result.numberValue;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/numberValue`"
[this val]
(aset this "numberValue" val))
(defn result-type
"Property.
The read-only resultType property of the `web.xpath.XPathResult`
represents the type of the result, as defined by the type constants.
`var resultType = result.resultType;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/resultType`"
[this]
(-> this (.-resultType)))
(defn set-result-type!
"Property.
The read-only resultType property of the `web.xpath.XPathResult`
represents the type of the result, as defined by the type constants.
`var resultType = result.resultType;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/resultType`"
[this val]
(aset this "resultType" val))
(defn single-node-value
"Property.
The read-only singleNodeValue property of the `web.xpath.XPathResult`
returns a `web.Node` value or null in case no node was matched
a result with `XPathResult.resultType` being ANY_UNORDERED_NODE_TYPE
FIRST_ORDERED_NODE_TYPE.
`var value = result.singleNodeValue;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/singleNodeValue`"
[this]
(-> this (.-singleNodeValue)))
(defn set-single-node-value!
"Property.
The read-only singleNodeValue property of the `web.xpath.XPathResult`
returns a `web.Node` value or null in case no node was matched
a result with `XPathResult.resultType` being ANY_UNORDERED_NODE_TYPE
FIRST_ORDERED_NODE_TYPE.
`var value = result.singleNodeValue;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/singleNodeValue`"
[this val]
(aset this "singleNodeValue" val))
(defn snapshot-length
"Property.
The read-only snapshotLength property of the `web.xpath.XPathResult`
represents the number of nodes in the result snapshot.
`var snapshotLength = result.snapshotLength;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/snapshotLength`"
[this]
(-> this (.-snapshotLength)))
(defn set-snapshot-length!
"Property.
The read-only snapshotLength property of the `web.xpath.XPathResult`
represents the number of nodes in the result snapshot.
`var snapshotLength = result.snapshotLength;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/snapshotLength`"
[this val]
(aset this "snapshotLength" val))
(defn string-value
"Property.
The read-only stringValue property of the `web.xpath.XPathResult`
returns the string value of a result with `XPathResult.resultType`
STRING_TYPE.
`var value = result.stringValue;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/stringValue`"
[this]
(-> this (.-stringValue)))
(defn set-string-value!
"Property.
The read-only stringValue property of the `web.xpath.XPathResult`
returns the string value of a result with `XPathResult.resultType`
STRING_TYPE.
`var value = result.stringValue;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/stringValue`"
[this val]
(aset this "stringValue" val))