maxcountryman_web_sys/features/
gen_PromiseRejectionEvent.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = PromiseRejectionEvent , typescript_type = "PromiseRejectionEvent")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `PromiseRejectionEvent` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEvent`*"]
13    pub type PromiseRejectionEvent;
14    # [wasm_bindgen (structural , method , getter , js_class = "PromiseRejectionEvent" , js_name = promise)]
15    #[doc = "Getter for the `promise` field of this object."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent/promise)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEvent`*"]
20    pub fn promise(this: &PromiseRejectionEvent) -> ::js_sys::Promise;
21    # [wasm_bindgen (structural , method , getter , js_class = "PromiseRejectionEvent" , js_name = reason)]
22    #[doc = "Getter for the `reason` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent/reason)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEvent`*"]
27    pub fn reason(this: &PromiseRejectionEvent) -> ::wasm_bindgen::JsValue;
28    #[cfg(feature = "PromiseRejectionEventInit")]
29    #[wasm_bindgen(catch, constructor, js_class = "PromiseRejectionEvent")]
30    #[doc = "The `new PromiseRejectionEvent(..)` constructor, creating a new instance of `PromiseRejectionEvent`."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent/PromiseRejectionEvent)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEvent`, `PromiseRejectionEventInit`*"]
35    pub fn new(
36        type_: &str,
37        event_init_dict: &PromiseRejectionEventInit,
38    ) -> Result<PromiseRejectionEvent, JsValue>;
39}