web_sys/features/
gen_DomError.rs1#![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 = "DOMError",
10 typescript_type = "DOMError"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `DomError` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMError)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `DomError`*"]
18 pub type DomError;
19 #[wasm_bindgen(method, getter, js_class = "DOMError", 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/DOMError/name)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `DomError`*"]
25 pub fn name(this: &DomError) -> ::alloc::string::String;
26 #[wasm_bindgen(method, getter, js_class = "DOMError", 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/DOMError/message)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `DomError`*"]
32 pub fn message(this: &DomError) -> ::alloc::string::String;
33 #[wasm_bindgen(catch, constructor, js_class = "DOMError")]
34 #[doc = "The `new DomError(..)` constructor, creating a new instance of `DomError`."]
35 #[doc = ""]
36 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMError/DOMError)"]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `DomError`*"]
39 pub fn new(name: &str) -> Result<DomError, JsValue>;
40 #[wasm_bindgen(catch, constructor, js_class = "DOMError")]
41 #[doc = "The `new DomError(..)` constructor, creating a new instance of `DomError`."]
42 #[doc = ""]
43 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMError/DOMError)"]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `DomError`*"]
46 pub fn new_with_message(name: &str, message: &str) -> Result<DomError, JsValue>;
47}