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