web_sys/features/
gen_CaretStateChangedEventInit.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 = CaretStateChangedEventInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `CaretStateChangedEventInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
12 pub type CaretStateChangedEventInit;
13 #[doc = "Get the `bubbles` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
16 #[wasm_bindgen(method, getter = "bubbles")]
17 pub fn get_bubbles(this: &CaretStateChangedEventInit) -> Option<bool>;
18 #[doc = "Change the `bubbles` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
21 #[wasm_bindgen(method, setter = "bubbles")]
22 pub fn set_bubbles(this: &CaretStateChangedEventInit, val: bool);
23 #[doc = "Get the `cancelable` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
26 #[wasm_bindgen(method, getter = "cancelable")]
27 pub fn get_cancelable(this: &CaretStateChangedEventInit) -> Option<bool>;
28 #[doc = "Change the `cancelable` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
31 #[wasm_bindgen(method, setter = "cancelable")]
32 pub fn set_cancelable(this: &CaretStateChangedEventInit, val: bool);
33 #[doc = "Get the `composed` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
36 #[wasm_bindgen(method, getter = "composed")]
37 pub fn get_composed(this: &CaretStateChangedEventInit) -> Option<bool>;
38 #[doc = "Change the `composed` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
41 #[wasm_bindgen(method, setter = "composed")]
42 pub fn set_composed(this: &CaretStateChangedEventInit, val: bool);
43 #[cfg(feature = "DomRectReadOnly")]
44 #[doc = "Get the `boundingClientRect` field of this object."]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"]
47 #[wasm_bindgen(method, getter = "boundingClientRect")]
48 pub fn get_bounding_client_rect(this: &CaretStateChangedEventInit) -> Option<DomRectReadOnly>;
49 #[cfg(feature = "DomRectReadOnly")]
50 #[doc = "Change the `boundingClientRect` field of this object."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"]
53 #[wasm_bindgen(method, setter = "boundingClientRect")]
54 pub fn set_bounding_client_rect(
55 this: &CaretStateChangedEventInit,
56 val: Option<&DomRectReadOnly>,
57 );
58 #[doc = "Get the `caretVisible` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
61 #[wasm_bindgen(method, getter = "caretVisible")]
62 pub fn get_caret_visible(this: &CaretStateChangedEventInit) -> Option<bool>;
63 #[doc = "Change the `caretVisible` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
66 #[wasm_bindgen(method, setter = "caretVisible")]
67 pub fn set_caret_visible(this: &CaretStateChangedEventInit, val: bool);
68 #[doc = "Get the `caretVisuallyVisible` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
71 #[wasm_bindgen(method, getter = "caretVisuallyVisible")]
72 pub fn get_caret_visually_visible(this: &CaretStateChangedEventInit) -> Option<bool>;
73 #[doc = "Change the `caretVisuallyVisible` field of this object."]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
76 #[wasm_bindgen(method, setter = "caretVisuallyVisible")]
77 pub fn set_caret_visually_visible(this: &CaretStateChangedEventInit, val: bool);
78 #[doc = "Get the `collapsed` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
81 #[wasm_bindgen(method, getter = "collapsed")]
82 pub fn get_collapsed(this: &CaretStateChangedEventInit) -> Option<bool>;
83 #[doc = "Change the `collapsed` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
86 #[wasm_bindgen(method, setter = "collapsed")]
87 pub fn set_collapsed(this: &CaretStateChangedEventInit, val: bool);
88 #[cfg(feature = "CaretChangedReason")]
89 #[doc = "Get the `reason` field of this object."]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"]
92 #[wasm_bindgen(method, getter = "reason")]
93 pub fn get_reason(this: &CaretStateChangedEventInit) -> Option<CaretChangedReason>;
94 #[cfg(feature = "CaretChangedReason")]
95 #[doc = "Change the `reason` field of this object."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"]
98 #[wasm_bindgen(method, setter = "reason")]
99 pub fn set_reason(this: &CaretStateChangedEventInit, val: CaretChangedReason);
100 #[doc = "Get the `selectedTextContent` field of this object."]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
103 #[wasm_bindgen(method, getter = "selectedTextContent")]
104 pub fn get_selected_text_content(
105 this: &CaretStateChangedEventInit,
106 ) -> Option<::alloc::string::String>;
107 #[doc = "Change the `selectedTextContent` field of this object."]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
110 #[wasm_bindgen(method, setter = "selectedTextContent")]
111 pub fn set_selected_text_content(this: &CaretStateChangedEventInit, val: &str);
112 #[doc = "Get the `selectionEditable` field of this object."]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
115 #[wasm_bindgen(method, getter = "selectionEditable")]
116 pub fn get_selection_editable(this: &CaretStateChangedEventInit) -> Option<bool>;
117 #[doc = "Change the `selectionEditable` field of this object."]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
120 #[wasm_bindgen(method, setter = "selectionEditable")]
121 pub fn set_selection_editable(this: &CaretStateChangedEventInit, val: bool);
122 #[doc = "Get the `selectionVisible` field of this object."]
123 #[doc = ""]
124 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
125 #[wasm_bindgen(method, getter = "selectionVisible")]
126 pub fn get_selection_visible(this: &CaretStateChangedEventInit) -> Option<bool>;
127 #[doc = "Change the `selectionVisible` field of this object."]
128 #[doc = ""]
129 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
130 #[wasm_bindgen(method, setter = "selectionVisible")]
131 pub fn set_selection_visible(this: &CaretStateChangedEventInit, val: bool);
132}
133impl CaretStateChangedEventInit {
134 #[doc = "Construct a new `CaretStateChangedEventInit`."]
135 #[doc = ""]
136 #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
137 pub fn new() -> Self {
138 #[allow(unused_mut)]
139 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
140 ret
141 }
142 #[deprecated = "Use `set_bubbles()` instead."]
143 pub fn bubbles(&mut self, val: bool) -> &mut Self {
144 self.set_bubbles(val);
145 self
146 }
147 #[deprecated = "Use `set_cancelable()` instead."]
148 pub fn cancelable(&mut self, val: bool) -> &mut Self {
149 self.set_cancelable(val);
150 self
151 }
152 #[deprecated = "Use `set_composed()` instead."]
153 pub fn composed(&mut self, val: bool) -> &mut Self {
154 self.set_composed(val);
155 self
156 }
157 #[cfg(feature = "DomRectReadOnly")]
158 #[deprecated = "Use `set_bounding_client_rect()` instead."]
159 pub fn bounding_client_rect(&mut self, val: Option<&DomRectReadOnly>) -> &mut Self {
160 self.set_bounding_client_rect(val);
161 self
162 }
163 #[deprecated = "Use `set_caret_visible()` instead."]
164 pub fn caret_visible(&mut self, val: bool) -> &mut Self {
165 self.set_caret_visible(val);
166 self
167 }
168 #[deprecated = "Use `set_caret_visually_visible()` instead."]
169 pub fn caret_visually_visible(&mut self, val: bool) -> &mut Self {
170 self.set_caret_visually_visible(val);
171 self
172 }
173 #[deprecated = "Use `set_collapsed()` instead."]
174 pub fn collapsed(&mut self, val: bool) -> &mut Self {
175 self.set_collapsed(val);
176 self
177 }
178 #[cfg(feature = "CaretChangedReason")]
179 #[deprecated = "Use `set_reason()` instead."]
180 pub fn reason(&mut self, val: CaretChangedReason) -> &mut Self {
181 self.set_reason(val);
182 self
183 }
184 #[deprecated = "Use `set_selected_text_content()` instead."]
185 pub fn selected_text_content(&mut self, val: &str) -> &mut Self {
186 self.set_selected_text_content(val);
187 self
188 }
189 #[deprecated = "Use `set_selection_editable()` instead."]
190 pub fn selection_editable(&mut self, val: bool) -> &mut Self {
191 self.set_selection_editable(val);
192 self
193 }
194 #[deprecated = "Use `set_selection_visible()` instead."]
195 pub fn selection_visible(&mut self, val: bool) -> &mut Self {
196 self.set_selection_visible(val);
197 self
198 }
199}
200impl Default for CaretStateChangedEventInit {
201 fn default() -> Self {
202 Self::new()
203 }
204}