1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = CaretPosition , typescript_type = "CaretPosition")]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `CaretPosition` class."]
9     #[doc = ""]
10     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition)"]
11     #[doc = ""]
12     #[doc = "*This API requires the following crate features to be activated: `CaretPosition`*"]
13     pub type CaretPosition;
14     #[cfg(feature = "Node")]
15     # [wasm_bindgen (structural , method , getter , js_class = "CaretPosition" , js_name = offsetNode)]
16     #[doc = "Getter for the `offsetNode` field of this object."]
17     #[doc = ""]
18     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition/offsetNode)"]
19     #[doc = ""]
20     #[doc = "*This API requires the following crate features to be activated: `CaretPosition`, `Node`*"]
offset_node(this: &CaretPosition) -> Option<Node>21     pub fn offset_node(this: &CaretPosition) -> Option<Node>;
22     # [wasm_bindgen (structural , method , getter , js_class = "CaretPosition" , js_name = offset)]
23     #[doc = "Getter for the `offset` field of this object."]
24     #[doc = ""]
25     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition/offset)"]
26     #[doc = ""]
27     #[doc = "*This API requires the following crate features to be activated: `CaretPosition`*"]
offset(this: &CaretPosition) -> u3228     pub fn offset(this: &CaretPosition) -> u32;
29     #[cfg(feature = "DomRect")]
30     # [wasm_bindgen (method , structural , js_class = "CaretPosition" , js_name = getClientRect)]
31     #[doc = "The `getClientRect()` method."]
32     #[doc = ""]
33     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition/getClientRect)"]
34     #[doc = ""]
35     #[doc = "*This API requires the following crate features to be activated: `CaretPosition`, `DomRect`*"]
get_client_rect(this: &CaretPosition) -> Option<DomRect>36     pub fn get_client_rect(this: &CaretPosition) -> Option<DomRect>;
37 }
38