web_sys/features/
gen_Text.rs

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