web_sys/features/
gen_ErrorEventInit.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 = ErrorEventInit)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `ErrorEventInit` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
12    pub type ErrorEventInit;
13    #[doc = "Get the `bubbles` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
16    #[wasm_bindgen(method, getter = "bubbles")]
17    pub fn get_bubbles(this: &ErrorEventInit) -> 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: `ErrorEventInit`*"]
21    #[wasm_bindgen(method, setter = "bubbles")]
22    pub fn set_bubbles(this: &ErrorEventInit, 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: `ErrorEventInit`*"]
26    #[wasm_bindgen(method, getter = "cancelable")]
27    pub fn get_cancelable(this: &ErrorEventInit) -> 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: `ErrorEventInit`*"]
31    #[wasm_bindgen(method, setter = "cancelable")]
32    pub fn set_cancelable(this: &ErrorEventInit, 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: `ErrorEventInit`*"]
36    #[wasm_bindgen(method, getter = "composed")]
37    pub fn get_composed(this: &ErrorEventInit) -> 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: `ErrorEventInit`*"]
41    #[wasm_bindgen(method, setter = "composed")]
42    pub fn set_composed(this: &ErrorEventInit, val: bool);
43    #[doc = "Get the `colno` field of this object."]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
46    #[wasm_bindgen(method, getter = "colno")]
47    pub fn get_colno(this: &ErrorEventInit) -> Option<u32>;
48    #[doc = "Change the `colno` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
51    #[wasm_bindgen(method, setter = "colno")]
52    pub fn set_colno(this: &ErrorEventInit, val: u32);
53    #[doc = "Get the `error` field of this object."]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
56    #[wasm_bindgen(method, getter = "error")]
57    pub fn get_error(this: &ErrorEventInit) -> ::wasm_bindgen::JsValue;
58    #[doc = "Change the `error` field of this object."]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
61    #[wasm_bindgen(method, setter = "error")]
62    pub fn set_error(this: &ErrorEventInit, val: &::wasm_bindgen::JsValue);
63    #[doc = "Get the `filename` field of this object."]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
66    #[wasm_bindgen(method, getter = "filename")]
67    pub fn get_filename(this: &ErrorEventInit) -> Option<::alloc::string::String>;
68    #[doc = "Change the `filename` field of this object."]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
71    #[wasm_bindgen(method, setter = "filename")]
72    pub fn set_filename(this: &ErrorEventInit, val: &str);
73    #[doc = "Get the `lineno` field of this object."]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
76    #[wasm_bindgen(method, getter = "lineno")]
77    pub fn get_lineno(this: &ErrorEventInit) -> Option<u32>;
78    #[doc = "Change the `lineno` field of this object."]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
81    #[wasm_bindgen(method, setter = "lineno")]
82    pub fn set_lineno(this: &ErrorEventInit, val: u32);
83    #[doc = "Get the `message` field of this object."]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
86    #[wasm_bindgen(method, getter = "message")]
87    pub fn get_message(this: &ErrorEventInit) -> Option<::alloc::string::String>;
88    #[doc = "Change the `message` field of this object."]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
91    #[wasm_bindgen(method, setter = "message")]
92    pub fn set_message(this: &ErrorEventInit, val: &str);
93}
94impl ErrorEventInit {
95    #[doc = "Construct a new `ErrorEventInit`."]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"]
98    pub fn new() -> Self {
99        #[allow(unused_mut)]
100        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
101        ret
102    }
103    #[deprecated = "Use `set_bubbles()` instead."]
104    pub fn bubbles(&mut self, val: bool) -> &mut Self {
105        self.set_bubbles(val);
106        self
107    }
108    #[deprecated = "Use `set_cancelable()` instead."]
109    pub fn cancelable(&mut self, val: bool) -> &mut Self {
110        self.set_cancelable(val);
111        self
112    }
113    #[deprecated = "Use `set_composed()` instead."]
114    pub fn composed(&mut self, val: bool) -> &mut Self {
115        self.set_composed(val);
116        self
117    }
118    #[deprecated = "Use `set_colno()` instead."]
119    pub fn colno(&mut self, val: u32) -> &mut Self {
120        self.set_colno(val);
121        self
122    }
123    #[deprecated = "Use `set_error()` instead."]
124    pub fn error(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
125        self.set_error(val);
126        self
127    }
128    #[deprecated = "Use `set_filename()` instead."]
129    pub fn filename(&mut self, val: &str) -> &mut Self {
130        self.set_filename(val);
131        self
132    }
133    #[deprecated = "Use `set_lineno()` instead."]
134    pub fn lineno(&mut self, val: u32) -> &mut Self {
135        self.set_lineno(val);
136        self
137    }
138    #[deprecated = "Use `set_message()` instead."]
139    pub fn message(&mut self, val: &str) -> &mut Self {
140        self.set_message(val);
141        self
142    }
143}
144impl Default for ErrorEventInit {
145    fn default() -> Self {
146        Self::new()
147    }
148}