web_sys/features/
gen_DomRequest.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "EventTarget",
9 extends = "::js_sys::Object",
10 js_name = "DOMRequest",
11 typescript_type = "DOMRequest"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `DomRequest` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `DomRequest`*"]
19 pub type DomRequest;
20 #[cfg(feature = "DomRequestReadyState")]
21 #[wasm_bindgen(method, getter, js_class = "DOMRequest", js_name = "readyState")]
22 #[doc = "Getter for the `readyState` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest/readyState)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `DomRequest`, `DomRequestReadyState`*"]
27 pub fn ready_state(this: &DomRequest) -> DomRequestReadyState;
28 #[wasm_bindgen(method, getter, js_class = "DOMRequest", js_name = "result")]
29 #[doc = "Getter for the `result` field of this object."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest/result)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `DomRequest`*"]
34 pub fn result(this: &DomRequest) -> ::wasm_bindgen::JsValue;
35 #[cfg(feature = "DomException")]
36 #[wasm_bindgen(method, getter, js_class = "DOMRequest", js_name = "error")]
37 #[doc = "Getter for the `error` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest/error)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `DomException`, `DomRequest`*"]
42 pub fn error(this: &DomRequest) -> Option<DomException>;
43 #[wasm_bindgen(method, getter, js_class = "DOMRequest", js_name = "onsuccess")]
44 #[doc = "Getter for the `onsuccess` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest/onsuccess)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `DomRequest`*"]
49 pub fn onsuccess(this: &DomRequest) -> Option<::js_sys::Function>;
50 #[wasm_bindgen(method, setter, js_class = "DOMRequest", js_name = "onsuccess")]
51 #[doc = "Setter for the `onsuccess` field of this object."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest/onsuccess)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `DomRequest`*"]
56 pub fn set_onsuccess(this: &DomRequest, value: Option<&::js_sys::Function>);
57 #[wasm_bindgen(method, getter, js_class = "DOMRequest", js_name = "onerror")]
58 #[doc = "Getter for the `onerror` field of this object."]
59 #[doc = ""]
60 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest/onerror)"]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `DomRequest`*"]
63 pub fn onerror(this: &DomRequest) -> Option<::js_sys::Function>;
64 #[wasm_bindgen(method, setter, js_class = "DOMRequest", js_name = "onerror")]
65 #[doc = "Setter for the `onerror` field of this object."]
66 #[doc = ""]
67 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest/onerror)"]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `DomRequest`*"]
70 pub fn set_onerror(this: &DomRequest, value: Option<&::js_sys::Function>);
71 #[wasm_bindgen(catch, method, js_class = "DOMRequest")]
72 #[doc = "The `then()` method."]
73 #[doc = ""]
74 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest/then)"]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `DomRequest`*"]
77 pub fn then(this: &DomRequest) -> Result<::wasm_bindgen::JsValue, JsValue>;
78 #[wasm_bindgen(catch, method, js_class = "DOMRequest", js_name = "then")]
79 #[doc = "The `then()` method."]
80 #[doc = ""]
81 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest/then)"]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `DomRequest`*"]
84 pub fn then_with_fulfill_callback(
85 this: &DomRequest,
86 fulfill_callback: Option<&::js_sys::Function>,
87 ) -> Result<::wasm_bindgen::JsValue, JsValue>;
88 #[wasm_bindgen(catch, method, js_class = "DOMRequest", js_name = "then")]
89 #[doc = "The `then()` method."]
90 #[doc = ""]
91 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest/then)"]
92 #[doc = ""]
93 #[doc = "*This API requires the following crate features to be activated: `DomRequest`*"]
94 pub fn then_with_fulfill_callback_and_reject_callback(
95 this: &DomRequest,
96 fulfill_callback: Option<&::js_sys::Function>,
97 reject_callback: Option<&::js_sys::Function>,
98 ) -> Result<::wasm_bindgen::JsValue, JsValue>;
99}