Skip to main content

web_sys/features/
gen_DomException.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "::js_sys::Object",
9        js_name = "DOMException",
10        typescript_type = "DOMException"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `DomException` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
18    pub type DomException;
19    #[wasm_bindgen(method, getter, js_class = "DOMException", js_name = "name")]
20    #[doc = "Getter for the `name` field of this object."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/name)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
25    pub fn name(this: &DomException) -> ::alloc::string::String;
26    #[wasm_bindgen(method, getter, js_class = "DOMException", js_name = "message")]
27    #[doc = "Getter for the `message` field of this object."]
28    #[doc = ""]
29    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/message)"]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
32    pub fn message(this: &DomException) -> ::alloc::string::String;
33    #[wasm_bindgen(method, getter, js_class = "DOMException", js_name = "code")]
34    #[doc = "Getter for the `code` field of this object."]
35    #[doc = ""]
36    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/code)"]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
39    pub fn code(this: &DomException) -> u16;
40    #[wasm_bindgen(method, getter, js_class = "DOMException", js_name = "result")]
41    #[doc = "Getter for the `result` field of this object."]
42    #[doc = ""]
43    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/result)"]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
46    pub fn result(this: &DomException) -> u32;
47    #[wasm_bindgen(method, getter, js_class = "DOMException", js_name = "filename")]
48    #[doc = "Getter for the `filename` field of this object."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/filename)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
53    pub fn filename(this: &DomException) -> ::alloc::string::String;
54    #[wasm_bindgen(method, getter, js_class = "DOMException", js_name = "lineNumber")]
55    #[doc = "Getter for the `lineNumber` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/lineNumber)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
60    pub fn line_number(this: &DomException) -> u32;
61    #[wasm_bindgen(method, getter, js_class = "DOMException", js_name = "columnNumber")]
62    #[doc = "Getter for the `columnNumber` field of this object."]
63    #[doc = ""]
64    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/columnNumber)"]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
67    pub fn column_number(this: &DomException) -> u32;
68    #[wasm_bindgen(method, getter, js_class = "DOMException", js_name = "data")]
69    #[doc = "Getter for the `data` field of this object."]
70    #[doc = ""]
71    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/data)"]
72    #[doc = ""]
73    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
74    pub fn data(this: &DomException) -> Option<::js_sys::Object>;
75    #[wasm_bindgen(method, getter, js_class = "DOMException", js_name = "stack")]
76    #[doc = "Getter for the `stack` field of this object."]
77    #[doc = ""]
78    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/stack)"]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
81    pub fn stack(this: &DomException) -> ::alloc::string::String;
82    #[wasm_bindgen(catch, constructor, js_class = "DOMException")]
83    #[doc = "The `new DomException(..)` constructor, creating a new instance of `DomException`."]
84    #[doc = ""]
85    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/DOMException)"]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
88    pub fn new() -> Result<DomException, JsValue>;
89    #[wasm_bindgen(catch, constructor, js_class = "DOMException")]
90    #[doc = "The `new DomException(..)` constructor, creating a new instance of `DomException`."]
91    #[doc = ""]
92    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/DOMException)"]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
95    pub fn new_with_message(message: &str) -> Result<DomException, JsValue>;
96    #[wasm_bindgen(catch, constructor, js_class = "DOMException")]
97    #[doc = "The `new DomException(..)` constructor, creating a new instance of `DomException`."]
98    #[doc = ""]
99    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMException/DOMException)"]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
102    pub fn new_with_message_and_name(message: &str, name: &str) -> Result<DomException, JsValue>;
103}
104impl DomException {
105    #[doc = "The `DOMException.INDEX_SIZE_ERR` const."]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
108    pub const INDEX_SIZE_ERR: u16 = 1u64 as u16;
109    #[doc = "The `DOMException.DOMSTRING_SIZE_ERR` const."]
110    #[doc = ""]
111    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
112    pub const DOMSTRING_SIZE_ERR: u16 = 2u64 as u16;
113    #[doc = "The `DOMException.HIERARCHY_REQUEST_ERR` const."]
114    #[doc = ""]
115    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
116    pub const HIERARCHY_REQUEST_ERR: u16 = 3u64 as u16;
117    #[doc = "The `DOMException.WRONG_DOCUMENT_ERR` const."]
118    #[doc = ""]
119    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
120    pub const WRONG_DOCUMENT_ERR: u16 = 4u64 as u16;
121    #[doc = "The `DOMException.INVALID_CHARACTER_ERR` const."]
122    #[doc = ""]
123    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
124    pub const INVALID_CHARACTER_ERR: u16 = 5u64 as u16;
125    #[doc = "The `DOMException.NO_DATA_ALLOWED_ERR` const."]
126    #[doc = ""]
127    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
128    pub const NO_DATA_ALLOWED_ERR: u16 = 6u64 as u16;
129    #[doc = "The `DOMException.NO_MODIFICATION_ALLOWED_ERR` const."]
130    #[doc = ""]
131    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
132    pub const NO_MODIFICATION_ALLOWED_ERR: u16 = 7u64 as u16;
133    #[doc = "The `DOMException.NOT_FOUND_ERR` const."]
134    #[doc = ""]
135    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
136    pub const NOT_FOUND_ERR: u16 = 8u64 as u16;
137    #[doc = "The `DOMException.NOT_SUPPORTED_ERR` const."]
138    #[doc = ""]
139    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
140    pub const NOT_SUPPORTED_ERR: u16 = 9u64 as u16;
141    #[doc = "The `DOMException.INUSE_ATTRIBUTE_ERR` const."]
142    #[doc = ""]
143    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
144    pub const INUSE_ATTRIBUTE_ERR: u16 = 10u64 as u16;
145    #[doc = "The `DOMException.INVALID_STATE_ERR` const."]
146    #[doc = ""]
147    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
148    pub const INVALID_STATE_ERR: u16 = 11u64 as u16;
149    #[doc = "The `DOMException.SYNTAX_ERR` const."]
150    #[doc = ""]
151    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
152    pub const SYNTAX_ERR: u16 = 12u64 as u16;
153    #[doc = "The `DOMException.INVALID_MODIFICATION_ERR` const."]
154    #[doc = ""]
155    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
156    pub const INVALID_MODIFICATION_ERR: u16 = 13u64 as u16;
157    #[doc = "The `DOMException.NAMESPACE_ERR` const."]
158    #[doc = ""]
159    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
160    pub const NAMESPACE_ERR: u16 = 14u64 as u16;
161    #[doc = "The `DOMException.INVALID_ACCESS_ERR` const."]
162    #[doc = ""]
163    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
164    pub const INVALID_ACCESS_ERR: u16 = 15u64 as u16;
165    #[doc = "The `DOMException.VALIDATION_ERR` const."]
166    #[doc = ""]
167    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
168    pub const VALIDATION_ERR: u16 = 16u64 as u16;
169    #[doc = "The `DOMException.TYPE_MISMATCH_ERR` const."]
170    #[doc = ""]
171    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
172    pub const TYPE_MISMATCH_ERR: u16 = 17u64 as u16;
173    #[doc = "The `DOMException.SECURITY_ERR` const."]
174    #[doc = ""]
175    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
176    pub const SECURITY_ERR: u16 = 18u64 as u16;
177    #[doc = "The `DOMException.NETWORK_ERR` const."]
178    #[doc = ""]
179    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
180    pub const NETWORK_ERR: u16 = 19u64 as u16;
181    #[doc = "The `DOMException.ABORT_ERR` const."]
182    #[doc = ""]
183    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
184    pub const ABORT_ERR: u16 = 20u64 as u16;
185    #[doc = "The `DOMException.URL_MISMATCH_ERR` const."]
186    #[doc = ""]
187    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
188    pub const URL_MISMATCH_ERR: u16 = 21u64 as u16;
189    #[doc = "The `DOMException.QUOTA_EXCEEDED_ERR` const."]
190    #[doc = ""]
191    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
192    pub const QUOTA_EXCEEDED_ERR: u16 = 22u64 as u16;
193    #[doc = "The `DOMException.TIMEOUT_ERR` const."]
194    #[doc = ""]
195    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
196    pub const TIMEOUT_ERR: u16 = 23u64 as u16;
197    #[doc = "The `DOMException.INVALID_NODE_TYPE_ERR` const."]
198    #[doc = ""]
199    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
200    pub const INVALID_NODE_TYPE_ERR: u16 = 24u64 as u16;
201    #[doc = "The `DOMException.DATA_CLONE_ERR` const."]
202    #[doc = ""]
203    #[doc = "*This API requires the following crate features to be activated: `DomException`*"]
204    pub const DATA_CLONE_ERR: u16 = 25u64 as u16;
205}