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