web_sys/features/
gen_ProgressEvent.rs1#![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 = ProgressEvent , typescript_type = "ProgressEvent")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `ProgressEvent` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `ProgressEvent`*"]
14 pub type ProgressEvent;
15 # [wasm_bindgen (structural , method , getter , js_class = "ProgressEvent" , js_name = lengthComputable)]
16 #[doc = "Getter for the `lengthComputable` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/lengthComputable)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `ProgressEvent`*"]
21 pub fn length_computable(this: &ProgressEvent) -> bool;
22 # [wasm_bindgen (structural , method , getter , js_class = "ProgressEvent" , js_name = loaded)]
23 #[doc = "Getter for the `loaded` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/loaded)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `ProgressEvent`*"]
28 pub fn loaded(this: &ProgressEvent) -> f64;
29 # [wasm_bindgen (structural , method , getter , js_class = "ProgressEvent" , js_name = total)]
30 #[doc = "Getter for the `total` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/total)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `ProgressEvent`*"]
35 pub fn total(this: &ProgressEvent) -> f64;
36 #[wasm_bindgen(catch, constructor, js_class = "ProgressEvent")]
37 #[doc = "The `new ProgressEvent(..)` constructor, creating a new instance of `ProgressEvent`."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/ProgressEvent)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `ProgressEvent`*"]
42 pub fn new(type_: &str) -> Result<ProgressEvent, JsValue>;
43 #[cfg(feature = "ProgressEventInit")]
44 #[wasm_bindgen(catch, constructor, js_class = "ProgressEvent")]
45 #[doc = "The `new ProgressEvent(..)` constructor, creating a new instance of `ProgressEvent`."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/ProgressEvent)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `ProgressEvent`, `ProgressEventInit`*"]
50 pub fn new_with_event_init_dict(
51 type_: &str,
52 event_init_dict: &ProgressEventInit,
53 ) -> Result<ProgressEvent, JsValue>;
54}