web_sys/features/
gen_ProgressEventInit.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ProgressEventInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `ProgressEventInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
12 pub type ProgressEventInit;
13 #[doc = "Get the `bubbles` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
16 #[wasm_bindgen(method, getter = "bubbles")]
17 pub fn get_bubbles(this: &ProgressEventInit) -> Option<bool>;
18 #[doc = "Change the `bubbles` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
21 #[wasm_bindgen(method, setter = "bubbles")]
22 pub fn set_bubbles(this: &ProgressEventInit, val: bool);
23 #[doc = "Get the `cancelable` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
26 #[wasm_bindgen(method, getter = "cancelable")]
27 pub fn get_cancelable(this: &ProgressEventInit) -> Option<bool>;
28 #[doc = "Change the `cancelable` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
31 #[wasm_bindgen(method, setter = "cancelable")]
32 pub fn set_cancelable(this: &ProgressEventInit, val: bool);
33 #[doc = "Get the `composed` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
36 #[wasm_bindgen(method, getter = "composed")]
37 pub fn get_composed(this: &ProgressEventInit) -> Option<bool>;
38 #[doc = "Change the `composed` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
41 #[wasm_bindgen(method, setter = "composed")]
42 pub fn set_composed(this: &ProgressEventInit, val: bool);
43 #[doc = "Get the `lengthComputable` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
46 #[wasm_bindgen(method, getter = "lengthComputable")]
47 pub fn get_length_computable(this: &ProgressEventInit) -> Option<bool>;
48 #[doc = "Change the `lengthComputable` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
51 #[wasm_bindgen(method, setter = "lengthComputable")]
52 pub fn set_length_computable(this: &ProgressEventInit, val: bool);
53 #[doc = "Get the `loaded` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
56 #[wasm_bindgen(method, getter = "loaded")]
57 pub fn get_loaded(this: &ProgressEventInit) -> Option<f64>;
58 #[doc = "Change the `loaded` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
61 #[wasm_bindgen(method, setter = "loaded")]
62 pub fn set_loaded(this: &ProgressEventInit, val: f64);
63 #[doc = "Change the `loaded` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
66 #[wasm_bindgen(method, setter = "loaded")]
67 pub fn set_loaded_u32(this: &ProgressEventInit, val: u32);
68 #[doc = "Change the `loaded` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
71 #[wasm_bindgen(method, setter = "loaded")]
72 pub fn set_loaded_f64(this: &ProgressEventInit, val: f64);
73 #[doc = "Get the `total` field of this object."]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
76 #[wasm_bindgen(method, getter = "total")]
77 pub fn get_total(this: &ProgressEventInit) -> Option<f64>;
78 #[doc = "Change the `total` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
81 #[wasm_bindgen(method, setter = "total")]
82 pub fn set_total(this: &ProgressEventInit, val: f64);
83 #[doc = "Change the `total` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
86 #[wasm_bindgen(method, setter = "total")]
87 pub fn set_total_u32(this: &ProgressEventInit, val: u32);
88 #[doc = "Change the `total` field of this object."]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
91 #[wasm_bindgen(method, setter = "total")]
92 pub fn set_total_f64(this: &ProgressEventInit, val: f64);
93}
94impl ProgressEventInit {
95 #[doc = "Construct a new `ProgressEventInit`."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"]
98 pub fn new() -> Self {
99 #[allow(unused_mut)]
100 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
101 ret
102 }
103 #[deprecated = "Use `set_bubbles()` instead."]
104 pub fn bubbles(&mut self, val: bool) -> &mut Self {
105 self.set_bubbles(val);
106 self
107 }
108 #[deprecated = "Use `set_cancelable()` instead."]
109 pub fn cancelable(&mut self, val: bool) -> &mut Self {
110 self.set_cancelable(val);
111 self
112 }
113 #[deprecated = "Use `set_composed()` instead."]
114 pub fn composed(&mut self, val: bool) -> &mut Self {
115 self.set_composed(val);
116 self
117 }
118 #[deprecated = "Use `set_length_computable()` instead."]
119 pub fn length_computable(&mut self, val: bool) -> &mut Self {
120 self.set_length_computable(val);
121 self
122 }
123 #[deprecated = "Use `set_loaded()` instead."]
124 pub fn loaded(&mut self, val: f64) -> &mut Self {
125 self.set_loaded(val);
126 self
127 }
128 #[deprecated = "Use `set_total()` instead."]
129 pub fn total(&mut self, val: f64) -> &mut Self {
130 self.set_total(val);
131 self
132 }
133}
134impl Default for ProgressEventInit {
135 fn default() -> Self {
136 Self::new()
137 }
138}