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