]> git.proxmox.com Git - rustc.git/blob - vendor/web-sys/src/features/gen_PromiseRejectionEvent.rs
New upstream version 1.72.1+dfsg1
[rustc.git] / vendor / web-sys / src / features / gen_PromiseRejectionEvent.rs
1 #![allow(unused_imports)]
2 #![allow(clippy::all)]
3 use super::*;
4 use wasm_bindgen::prelude::*;
5 #[wasm_bindgen]
6 extern "C" {
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."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent)"]
12 #[doc = ""]
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."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent/promise)"]
19 #[doc = ""]
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."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent/reason)"]
26 #[doc = ""]
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`."]
32 #[doc = ""]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent/PromiseRejectionEvent)"]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEvent`, `PromiseRejectionEventInit`*"]
36 pub fn new(
37 type_: &str,
38 event_init_dict: &PromiseRejectionEventInit,
39 ) -> Result<PromiseRejectionEvent, JsValue>;
40 }