web_sys/features/
gen_ClientRectsAndTexts.rs1#![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 = ClientRectsAndTexts)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `ClientRectsAndTexts` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"]
12 pub type ClientRectsAndTexts;
13 #[cfg(feature = "DomRectList")]
14 #[doc = "Get the `rectList` field of this object."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`, `DomRectList`*"]
17 #[wasm_bindgen(method, getter = "rectList")]
18 pub fn get_rect_list(this: &ClientRectsAndTexts) -> DomRectList;
19 #[cfg(feature = "DomRectList")]
20 #[doc = "Change the `rectList` field of this object."]
21 #[doc = ""]
22 #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`, `DomRectList`*"]
23 #[wasm_bindgen(method, setter = "rectList")]
24 pub fn set_rect_list(this: &ClientRectsAndTexts, val: &DomRectList);
25 #[doc = "Get the `textList` field of this object."]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"]
28 #[wasm_bindgen(method, getter = "textList")]
29 pub fn get_text_list(this: &ClientRectsAndTexts) -> ::js_sys::Array;
30 #[doc = "Change the `textList` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"]
33 #[wasm_bindgen(method, setter = "textList")]
34 pub fn set_text_list(this: &ClientRectsAndTexts, val: &::wasm_bindgen::JsValue);
35}
36impl ClientRectsAndTexts {
37 #[cfg(feature = "DomRectList")]
38 #[doc = "Construct a new `ClientRectsAndTexts`."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`, `DomRectList`*"]
41 pub fn new(rect_list: &DomRectList, text_list: &::wasm_bindgen::JsValue) -> Self {
42 #[allow(unused_mut)]
43 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
44 ret.set_rect_list(rect_list);
45 ret.set_text_list(text_list);
46 ret
47 }
48 #[cfg(feature = "DomRectList")]
49 #[deprecated = "Use `set_rect_list()` instead."]
50 pub fn rect_list(&mut self, val: &DomRectList) -> &mut Self {
51 self.set_rect_list(val);
52 self
53 }
54 #[deprecated = "Use `set_text_list()` instead."]
55 pub fn text_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
56 self.set_text_list(val);
57 self
58 }
59}