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