web_sys/features/
gen_ErrorEvent.rs

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