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