1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = CharacterData , extends = Node , extends = EventTarget , extends = :: js_sys :: Object , js_name = Text , typescript_type = "Text")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `Text` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `Text`*"]
13 pub type Text;
14 # [wasm_bindgen (structural , catch , method , getter , js_class = "Text" , js_name = wholeText)]
15 #[doc = "Getter for the `wholeText` field of this object."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/wholeText)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `Text`*"]
20 pub fn whole_text(this: &Text) -> Result<String, JsValue>;
21 #[cfg(feature = "HtmlSlotElement")]
22 # [wasm_bindgen (structural , method , getter , js_class = "Text" , js_name = assignedSlot)]
23 #[doc = "Getter for the `assignedSlot` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/assignedSlot)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `HtmlSlotElement`, `Text`*"]
28 pub fn assigned_slot(this: &Text) -> Option<HtmlSlotElement>;
29 #[wasm_bindgen(catch, constructor, js_class = "Text")]
30 #[doc = "The `new Text(..)` constructor, creating a new instance of `Text`."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/Text)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `Text`*"]
35 pub fn new() -> Result<Text, JsValue>;
36 #[wasm_bindgen(catch, constructor, js_class = "Text")]
37 #[doc = "The `new Text(..)` constructor, creating a new instance of `Text`."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/Text)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `Text`*"]
42 pub fn new_with_data(data: &str) -> Result<Text, JsValue>;
43 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = splitText)]
44 #[doc = "The `splitText()` method."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/splitText)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `Text`*"]
49 pub fn split_text(this: &Text, offset: u32) -> Result<Text, JsValue>;
50 #[cfg(all(feature = "DomPoint", feature = "DomPointInit",))]
51 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertPointFromNode)]
52 #[doc = "The `convertPointFromNode()` method."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertPointFromNode)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomPointInit`, `Text`*"]
57 pub fn convert_point_from_node_with_text(
58 this: &Text,
59 point: &DomPointInit,
60 from: &Text,
61 ) -> Result<DomPoint, JsValue>;
62 #[cfg(all(feature = "DomPoint", feature = "DomPointInit", feature = "Element",))]
63 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertPointFromNode)]
64 #[doc = "The `convertPointFromNode()` method."]
65 #[doc = ""]
66 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertPointFromNode)"]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomPointInit`, `Element`, `Text`*"]
69 pub fn convert_point_from_node_with_element(
70 this: &Text,
71 point: &DomPointInit,
72 from: &Element,
73 ) -> Result<DomPoint, JsValue>;
74 #[cfg(all(feature = "Document", feature = "DomPoint", feature = "DomPointInit",))]
75 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertPointFromNode)]
76 #[doc = "The `convertPointFromNode()` method."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertPointFromNode)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `Document`, `DomPoint`, `DomPointInit`, `Text`*"]
81 pub fn convert_point_from_node_with_document(
82 this: &Text,
83 point: &DomPointInit,
84 from: &Document,
85 ) -> Result<DomPoint, JsValue>;
86 #[cfg(all(
87 feature = "ConvertCoordinateOptions",
88 feature = "DomPoint",
89 feature = "DomPointInit",
90 ))]
91 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertPointFromNode)]
92 #[doc = "The `convertPointFromNode()` method."]
93 #[doc = ""]
94 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertPointFromNode)"]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `DomPoint`, `DomPointInit`, `Text`*"]
97 pub fn convert_point_from_node_with_text_and_options(
98 this: &Text,
99 point: &DomPointInit,
100 from: &Text,
101 options: &ConvertCoordinateOptions,
102 ) -> Result<DomPoint, JsValue>;
103 #[cfg(all(
104 feature = "ConvertCoordinateOptions",
105 feature = "DomPoint",
106 feature = "DomPointInit",
107 feature = "Element",
108 ))]
109 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertPointFromNode)]
110 #[doc = "The `convertPointFromNode()` method."]
111 #[doc = ""]
112 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertPointFromNode)"]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `DomPoint`, `DomPointInit`, `Element`, `Text`*"]
115 pub fn convert_point_from_node_with_element_and_options(
116 this: &Text,
117 point: &DomPointInit,
118 from: &Element,
119 options: &ConvertCoordinateOptions,
120 ) -> Result<DomPoint, JsValue>;
121 #[cfg(all(
122 feature = "ConvertCoordinateOptions",
123 feature = "Document",
124 feature = "DomPoint",
125 feature = "DomPointInit",
126 ))]
127 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertPointFromNode)]
128 #[doc = "The `convertPointFromNode()` method."]
129 #[doc = ""]
130 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertPointFromNode)"]
131 #[doc = ""]
132 #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `Document`, `DomPoint`, `DomPointInit`, `Text`*"]
133 pub fn convert_point_from_node_with_document_and_options(
134 this: &Text,
135 point: &DomPointInit,
136 from: &Document,
137 options: &ConvertCoordinateOptions,
138 ) -> Result<DomPoint, JsValue>;
139 #[cfg(feature = "DomQuad")]
140 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertQuadFromNode)]
141 #[doc = "The `convertQuadFromNode()` method."]
142 #[doc = ""]
143 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertQuadFromNode)"]
144 #[doc = ""]
145 #[doc = "*This API requires the following crate features to be activated: `DomQuad`, `Text`*"]
146 pub fn convert_quad_from_node_with_text(
147 this: &Text,
148 quad: &DomQuad,
149 from: &Text,
150 ) -> Result<DomQuad, JsValue>;
151 #[cfg(all(feature = "DomQuad", feature = "Element",))]
152 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertQuadFromNode)]
153 #[doc = "The `convertQuadFromNode()` method."]
154 #[doc = ""]
155 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertQuadFromNode)"]
156 #[doc = ""]
157 #[doc = "*This API requires the following crate features to be activated: `DomQuad`, `Element`, `Text`*"]
158 pub fn convert_quad_from_node_with_element(
159 this: &Text,
160 quad: &DomQuad,
161 from: &Element,
162 ) -> Result<DomQuad, JsValue>;
163 #[cfg(all(feature = "Document", feature = "DomQuad",))]
164 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertQuadFromNode)]
165 #[doc = "The `convertQuadFromNode()` method."]
166 #[doc = ""]
167 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertQuadFromNode)"]
168 #[doc = ""]
169 #[doc = "*This API requires the following crate features to be activated: `Document`, `DomQuad`, `Text`*"]
170 pub fn convert_quad_from_node_with_document(
171 this: &Text,
172 quad: &DomQuad,
173 from: &Document,
174 ) -> Result<DomQuad, JsValue>;
175 #[cfg(all(feature = "ConvertCoordinateOptions", feature = "DomQuad",))]
176 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertQuadFromNode)]
177 #[doc = "The `convertQuadFromNode()` method."]
178 #[doc = ""]
179 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertQuadFromNode)"]
180 #[doc = ""]
181 #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `DomQuad`, `Text`*"]
182 pub fn convert_quad_from_node_with_text_and_options(
183 this: &Text,
184 quad: &DomQuad,
185 from: &Text,
186 options: &ConvertCoordinateOptions,
187 ) -> Result<DomQuad, JsValue>;
188 #[cfg(all(
189 feature = "ConvertCoordinateOptions",
190 feature = "DomQuad",
191 feature = "Element",
192 ))]
193 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertQuadFromNode)]
194 #[doc = "The `convertQuadFromNode()` method."]
195 #[doc = ""]
196 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertQuadFromNode)"]
197 #[doc = ""]
198 #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `DomQuad`, `Element`, `Text`*"]
199 pub fn convert_quad_from_node_with_element_and_options(
200 this: &Text,
201 quad: &DomQuad,
202 from: &Element,
203 options: &ConvertCoordinateOptions,
204 ) -> Result<DomQuad, JsValue>;
205 #[cfg(all(
206 feature = "ConvertCoordinateOptions",
207 feature = "Document",
208 feature = "DomQuad",
209 ))]
210 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertQuadFromNode)]
211 #[doc = "The `convertQuadFromNode()` method."]
212 #[doc = ""]
213 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertQuadFromNode)"]
214 #[doc = ""]
215 #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `Document`, `DomQuad`, `Text`*"]
216 pub fn convert_quad_from_node_with_document_and_options(
217 this: &Text,
218 quad: &DomQuad,
219 from: &Document,
220 options: &ConvertCoordinateOptions,
221 ) -> Result<DomQuad, JsValue>;
222 #[cfg(all(feature = "DomQuad", feature = "DomRectReadOnly",))]
223 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertRectFromNode)]
224 #[doc = "The `convertRectFromNode()` method."]
225 #[doc = ""]
226 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertRectFromNode)"]
227 #[doc = ""]
228 #[doc = "*This API requires the following crate features to be activated: `DomQuad`, `DomRectReadOnly`, `Text`*"]
229 pub fn convert_rect_from_node_with_text(
230 this: &Text,
231 rect: &DomRectReadOnly,
232 from: &Text,
233 ) -> Result<DomQuad, JsValue>;
234 #[cfg(all(feature = "DomQuad", feature = "DomRectReadOnly", feature = "Element",))]
235 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertRectFromNode)]
236 #[doc = "The `convertRectFromNode()` method."]
237 #[doc = ""]
238 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertRectFromNode)"]
239 #[doc = ""]
240 #[doc = "*This API requires the following crate features to be activated: `DomQuad`, `DomRectReadOnly`, `Element`, `Text`*"]
241 pub fn convert_rect_from_node_with_element(
242 this: &Text,
243 rect: &DomRectReadOnly,
244 from: &Element,
245 ) -> Result<DomQuad, JsValue>;
246 #[cfg(all(feature = "Document", feature = "DomQuad", feature = "DomRectReadOnly",))]
247 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertRectFromNode)]
248 #[doc = "The `convertRectFromNode()` method."]
249 #[doc = ""]
250 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertRectFromNode)"]
251 #[doc = ""]
252 #[doc = "*This API requires the following crate features to be activated: `Document`, `DomQuad`, `DomRectReadOnly`, `Text`*"]
253 pub fn convert_rect_from_node_with_document(
254 this: &Text,
255 rect: &DomRectReadOnly,
256 from: &Document,
257 ) -> Result<DomQuad, JsValue>;
258 #[cfg(all(
259 feature = "ConvertCoordinateOptions",
260 feature = "DomQuad",
261 feature = "DomRectReadOnly",
262 ))]
263 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertRectFromNode)]
264 #[doc = "The `convertRectFromNode()` method."]
265 #[doc = ""]
266 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertRectFromNode)"]
267 #[doc = ""]
268 #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `DomQuad`, `DomRectReadOnly`, `Text`*"]
269 pub fn convert_rect_from_node_with_text_and_options(
270 this: &Text,
271 rect: &DomRectReadOnly,
272 from: &Text,
273 options: &ConvertCoordinateOptions,
274 ) -> Result<DomQuad, JsValue>;
275 #[cfg(all(
276 feature = "ConvertCoordinateOptions",
277 feature = "DomQuad",
278 feature = "DomRectReadOnly",
279 feature = "Element",
280 ))]
281 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertRectFromNode)]
282 #[doc = "The `convertRectFromNode()` method."]
283 #[doc = ""]
284 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertRectFromNode)"]
285 #[doc = ""]
286 #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `DomQuad`, `DomRectReadOnly`, `Element`, `Text`*"]
287 pub fn convert_rect_from_node_with_element_and_options(
288 this: &Text,
289 rect: &DomRectReadOnly,
290 from: &Element,
291 options: &ConvertCoordinateOptions,
292 ) -> Result<DomQuad, JsValue>;
293 #[cfg(all(
294 feature = "ConvertCoordinateOptions",
295 feature = "Document",
296 feature = "DomQuad",
297 feature = "DomRectReadOnly",
298 ))]
299 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = convertRectFromNode)]
300 #[doc = "The `convertRectFromNode()` method."]
301 #[doc = ""]
302 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/convertRectFromNode)"]
303 #[doc = ""]
304 #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `Document`, `DomQuad`, `DomRectReadOnly`, `Text`*"]
305 pub fn convert_rect_from_node_with_document_and_options(
306 this: &Text,
307 rect: &DomRectReadOnly,
308 from: &Document,
309 options: &ConvertCoordinateOptions,
310 ) -> Result<DomQuad, JsValue>;
311 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = getBoxQuads)]
312 #[doc = "The `getBoxQuads()` method."]
313 #[doc = ""]
314 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/getBoxQuads)"]
315 #[doc = ""]
316 #[doc = "*This API requires the following crate features to be activated: `Text`*"]
317 pub fn get_box_quads(this: &Text) -> Result<::js_sys::Array, JsValue>;
318 #[cfg(feature = "BoxQuadOptions")]
319 # [wasm_bindgen (catch , method , structural , js_class = "Text" , js_name = getBoxQuads)]
320 #[doc = "The `getBoxQuads()` method."]
321 #[doc = ""]
322 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Text/getBoxQuads)"]
323 #[doc = ""]
324 #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `Text`*"]
325 pub fn get_box_quads_with_options(
326 this: &Text,
327 options: &BoxQuadOptions,
328 ) -> Result<::js_sys::Array, JsValue>;
329}