web_sys/features/
gen_ErrorEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "Event",
9 extends = "::js_sys::Object",
10 js_name = "ErrorEvent",
11 typescript_type = "ErrorEvent"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `ErrorEvent` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `ErrorEvent`*"]
19 pub type ErrorEvent;
20 #[wasm_bindgen(method, getter, js_class = "ErrorEvent", js_name = "message")]
21 #[doc = "Getter for the `message` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent/message)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `ErrorEvent`*"]
26 pub fn message(this: &ErrorEvent) -> ::alloc::string::String;
27 #[wasm_bindgen(method, getter, js_class = "ErrorEvent", js_name = "filename")]
28 #[doc = "Getter for the `filename` field of this object."]
29 #[doc = ""]
30 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent/filename)"]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `ErrorEvent`*"]
33 pub fn filename(this: &ErrorEvent) -> ::alloc::string::String;
34 #[wasm_bindgen(method, getter, js_class = "ErrorEvent", js_name = "lineno")]
35 #[doc = "Getter for the `lineno` field of this object."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent/lineno)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `ErrorEvent`*"]
40 pub fn lineno(this: &ErrorEvent) -> u32;
41 #[wasm_bindgen(method, getter, js_class = "ErrorEvent", js_name = "colno")]
42 #[doc = "Getter for the `colno` field of this object."]
43 #[doc = ""]
44 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent/colno)"]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `ErrorEvent`*"]
47 pub fn colno(this: &ErrorEvent) -> u32;
48 #[wasm_bindgen(method, getter, js_class = "ErrorEvent", js_name = "error")]
49 #[doc = "Getter for the `error` field of this object."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent/error)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `ErrorEvent`*"]
54 pub fn error(this: &ErrorEvent) -> ::wasm_bindgen::JsValue;
55 #[wasm_bindgen(catch, constructor, js_class = "ErrorEvent")]
56 #[doc = "The `new ErrorEvent(..)` constructor, creating a new instance of `ErrorEvent`."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent/ErrorEvent)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `ErrorEvent`*"]
61 pub fn new(type_: &str) -> Result<ErrorEvent, JsValue>;
62 #[cfg(feature = "ErrorEventInit")]
63 #[wasm_bindgen(catch, constructor, js_class = "ErrorEvent")]
64 #[doc = "The `new ErrorEvent(..)` constructor, creating a new instance of `ErrorEvent`."]
65 #[doc = ""]
66 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent/ErrorEvent)"]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `ErrorEvent`, `ErrorEventInit`*"]
69 pub fn new_with_event_init_dict(
70 type_: &str,
71 event_init_dict: &ErrorEventInit,
72 ) -> Result<ErrorEvent, JsValue>;
73}