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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = Range , typescript_type = "Range")]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `Range` class."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub type Range;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (structural , catch , method , getter , js_class = "Range" , js_name = startContainer)]
    #[doc = "Getter for the `startContainer` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/startContainer)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn start_container(this: &Range) -> Result<Node, JsValue>;
    # [wasm_bindgen (structural , catch , method , getter , js_class = "Range" , js_name = startOffset)]
    #[doc = "Getter for the `startOffset` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/startOffset)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub fn start_offset(this: &Range) -> Result<u32, JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (structural , catch , method , getter , js_class = "Range" , js_name = endContainer)]
    #[doc = "Getter for the `endContainer` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/endContainer)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn end_container(this: &Range) -> Result<Node, JsValue>;
    # [wasm_bindgen (structural , catch , method , getter , js_class = "Range" , js_name = endOffset)]
    #[doc = "Getter for the `endOffset` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/endOffset)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub fn end_offset(this: &Range) -> Result<u32, JsValue>;
    # [wasm_bindgen (structural , method , getter , js_class = "Range" , js_name = collapsed)]
    #[doc = "Getter for the `collapsed` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/collapsed)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub fn collapsed(this: &Range) -> bool;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (structural , catch , method , getter , js_class = "Range" , js_name = commonAncestorContainer)]
    #[doc = "Getter for the `commonAncestorContainer` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/commonAncestorContainer)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn common_ancestor_container(this: &Range) -> Result<Node, JsValue>;
    #[wasm_bindgen(catch, constructor, js_class = "Range")]
    #[doc = "The `new Range(..)` constructor, creating a new instance of `Range`."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/Range)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub fn new() -> Result<Range, JsValue>;
    #[cfg(feature = "DocumentFragment")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = cloneContents)]
    #[doc = "The `cloneContents()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/cloneContents)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DocumentFragment`, `Range`*"]
    pub fn clone_contents(this: &Range) -> Result<DocumentFragment, JsValue>;
    # [wasm_bindgen (method , structural , js_class = "Range" , js_name = cloneRange)]
    #[doc = "The `cloneRange()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/cloneRange)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub fn clone_range(this: &Range) -> Range;
    # [wasm_bindgen (method , structural , js_class = "Range" , js_name = collapse)]
    #[doc = "The `collapse()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/collapse)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub fn collapse(this: &Range);
    # [wasm_bindgen (method , structural , js_class = "Range" , js_name = collapse)]
    #[doc = "The `collapse()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/collapse)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub fn collapse_with_to_start(this: &Range, to_start: bool);
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = compareBoundaryPoints)]
    #[doc = "The `compareBoundaryPoints()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/compareBoundaryPoints)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub fn compare_boundary_points(
        this: &Range,
        how: u16,
        source_range: &Range,
    ) -> Result<i16, JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = comparePoint)]
    #[doc = "The `comparePoint()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/comparePoint)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn compare_point(this: &Range, node: &Node, offset: u32) -> Result<i16, JsValue>;
    #[cfg(feature = "DocumentFragment")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = createContextualFragment)]
    #[doc = "The `createContextualFragment()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/createContextualFragment)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DocumentFragment`, `Range`*"]
    pub fn create_contextual_fragment(
        this: &Range,
        fragment: &str,
    ) -> Result<DocumentFragment, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = deleteContents)]
    #[doc = "The `deleteContents()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/deleteContents)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub fn delete_contents(this: &Range) -> Result<(), JsValue>;
    # [wasm_bindgen (method , structural , js_class = "Range" , js_name = detach)]
    #[doc = "The `detach()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/detach)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub fn detach(this: &Range);
    #[cfg(feature = "DocumentFragment")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = extractContents)]
    #[doc = "The `extractContents()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/extractContents)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DocumentFragment`, `Range`*"]
    pub fn extract_contents(this: &Range) -> Result<DocumentFragment, JsValue>;
    #[cfg(feature = "DomRect")]
    # [wasm_bindgen (method , structural , js_class = "Range" , js_name = getBoundingClientRect)]
    #[doc = "The `getBoundingClientRect()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/getBoundingClientRect)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DomRect`, `Range`*"]
    pub fn get_bounding_client_rect(this: &Range) -> DomRect;
    #[cfg(feature = "DomRectList")]
    # [wasm_bindgen (method , structural , js_class = "Range" , js_name = getClientRects)]
    #[doc = "The `getClientRects()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/getClientRects)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `DomRectList`, `Range`*"]
    pub fn get_client_rects(this: &Range) -> Option<DomRectList>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = insertNode)]
    #[doc = "The `insertNode()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/insertNode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn insert_node(this: &Range, node: &Node) -> Result<(), JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = intersectsNode)]
    #[doc = "The `intersectsNode()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/intersectsNode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn intersects_node(this: &Range, node: &Node) -> Result<bool, JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = isPointInRange)]
    #[doc = "The `isPointInRange()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/isPointInRange)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn is_point_in_range(this: &Range, node: &Node, offset: u32) -> Result<bool, JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = selectNode)]
    #[doc = "The `selectNode()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/selectNode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn select_node(this: &Range, ref_node: &Node) -> Result<(), JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = selectNodeContents)]
    #[doc = "The `selectNodeContents()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/selectNodeContents)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn select_node_contents(this: &Range, ref_node: &Node) -> Result<(), JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = setEnd)]
    #[doc = "The `setEnd()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/setEnd)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn set_end(this: &Range, ref_node: &Node, offset: u32) -> Result<(), JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = setEndAfter)]
    #[doc = "The `setEndAfter()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/setEndAfter)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn set_end_after(this: &Range, ref_node: &Node) -> Result<(), JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = setEndBefore)]
    #[doc = "The `setEndBefore()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/setEndBefore)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn set_end_before(this: &Range, ref_node: &Node) -> Result<(), JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = setStart)]
    #[doc = "The `setStart()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/setStart)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn set_start(this: &Range, ref_node: &Node, offset: u32) -> Result<(), JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = setStartAfter)]
    #[doc = "The `setStartAfter()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/setStartAfter)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn set_start_after(this: &Range, ref_node: &Node) -> Result<(), JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = setStartBefore)]
    #[doc = "The `setStartBefore()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/setStartBefore)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn set_start_before(this: &Range, ref_node: &Node) -> Result<(), JsValue>;
    #[cfg(feature = "Node")]
    # [wasm_bindgen (catch , method , structural , js_class = "Range" , js_name = surroundContents)]
    #[doc = "The `surroundContents()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Range/surroundContents)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `Range`*"]
    pub fn surround_contents(this: &Range, new_parent: &Node) -> Result<(), JsValue>;
}
impl Range {
    #[doc = "The `Range.START_TO_START` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub const START_TO_START: u16 = 0i64 as u16;
    #[doc = "The `Range.START_TO_END` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub const START_TO_END: u16 = 1u64 as u16;
    #[doc = "The `Range.END_TO_END` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub const END_TO_END: u16 = 2u64 as u16;
    #[doc = "The `Range.END_TO_START` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Range`*"]
    pub const END_TO_START: u16 = 3u64 as u16;
}