web_sys/features/
gen_CaretPosition.rs

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