web_sys/features/
gen_PerformanceEntryEventInit.rs

1#![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 = PerformanceEntryEventInit)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `PerformanceEntryEventInit` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
12    pub type PerformanceEntryEventInit;
13    #[doc = "Get the `bubbles` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
16    #[wasm_bindgen(method, getter = "bubbles")]
17    pub fn get_bubbles(this: &PerformanceEntryEventInit) -> 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: `PerformanceEntryEventInit`*"]
21    #[wasm_bindgen(method, setter = "bubbles")]
22    pub fn set_bubbles(this: &PerformanceEntryEventInit, 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: `PerformanceEntryEventInit`*"]
26    #[wasm_bindgen(method, getter = "cancelable")]
27    pub fn get_cancelable(this: &PerformanceEntryEventInit) -> 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: `PerformanceEntryEventInit`*"]
31    #[wasm_bindgen(method, setter = "cancelable")]
32    pub fn set_cancelable(this: &PerformanceEntryEventInit, 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: `PerformanceEntryEventInit`*"]
36    #[wasm_bindgen(method, getter = "composed")]
37    pub fn get_composed(this: &PerformanceEntryEventInit) -> 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: `PerformanceEntryEventInit`*"]
41    #[wasm_bindgen(method, setter = "composed")]
42    pub fn set_composed(this: &PerformanceEntryEventInit, val: bool);
43    #[doc = "Get the `duration` field of this object."]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
46    #[wasm_bindgen(method, getter = "duration")]
47    pub fn get_duration(this: &PerformanceEntryEventInit) -> Option<f64>;
48    #[doc = "Change the `duration` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
51    #[wasm_bindgen(method, setter = "duration")]
52    pub fn set_duration(this: &PerformanceEntryEventInit, val: f64);
53    #[doc = "Get the `entryType` field of this object."]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
56    #[wasm_bindgen(method, getter = "entryType")]
57    pub fn get_entry_type(this: &PerformanceEntryEventInit) -> Option<::alloc::string::String>;
58    #[doc = "Change the `entryType` field of this object."]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
61    #[wasm_bindgen(method, setter = "entryType")]
62    pub fn set_entry_type(this: &PerformanceEntryEventInit, val: &str);
63    #[doc = "Get the `epoch` field of this object."]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
66    #[wasm_bindgen(method, getter = "epoch")]
67    pub fn get_epoch(this: &PerformanceEntryEventInit) -> Option<f64>;
68    #[doc = "Change the `epoch` field of this object."]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
71    #[wasm_bindgen(method, setter = "epoch")]
72    pub fn set_epoch(this: &PerformanceEntryEventInit, val: f64);
73    #[doc = "Get the `name` field of this object."]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
76    #[wasm_bindgen(method, getter = "name")]
77    pub fn get_name(this: &PerformanceEntryEventInit) -> Option<::alloc::string::String>;
78    #[doc = "Change the `name` field of this object."]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
81    #[wasm_bindgen(method, setter = "name")]
82    pub fn set_name(this: &PerformanceEntryEventInit, val: &str);
83    #[doc = "Get the `origin` field of this object."]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
86    #[wasm_bindgen(method, getter = "origin")]
87    pub fn get_origin(this: &PerformanceEntryEventInit) -> Option<::alloc::string::String>;
88    #[doc = "Change the `origin` field of this object."]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
91    #[wasm_bindgen(method, setter = "origin")]
92    pub fn set_origin(this: &PerformanceEntryEventInit, val: &str);
93    #[doc = "Get the `startTime` field of this object."]
94    #[doc = ""]
95    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
96    #[wasm_bindgen(method, getter = "startTime")]
97    pub fn get_start_time(this: &PerformanceEntryEventInit) -> Option<f64>;
98    #[doc = "Change the `startTime` field of this object."]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
101    #[wasm_bindgen(method, setter = "startTime")]
102    pub fn set_start_time(this: &PerformanceEntryEventInit, val: f64);
103}
104impl PerformanceEntryEventInit {
105    #[doc = "Construct a new `PerformanceEntryEventInit`."]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"]
108    pub fn new() -> Self {
109        #[allow(unused_mut)]
110        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
111        ret
112    }
113    #[deprecated = "Use `set_bubbles()` instead."]
114    pub fn bubbles(&mut self, val: bool) -> &mut Self {
115        self.set_bubbles(val);
116        self
117    }
118    #[deprecated = "Use `set_cancelable()` instead."]
119    pub fn cancelable(&mut self, val: bool) -> &mut Self {
120        self.set_cancelable(val);
121        self
122    }
123    #[deprecated = "Use `set_composed()` instead."]
124    pub fn composed(&mut self, val: bool) -> &mut Self {
125        self.set_composed(val);
126        self
127    }
128    #[deprecated = "Use `set_duration()` instead."]
129    pub fn duration(&mut self, val: f64) -> &mut Self {
130        self.set_duration(val);
131        self
132    }
133    #[deprecated = "Use `set_entry_type()` instead."]
134    pub fn entry_type(&mut self, val: &str) -> &mut Self {
135        self.set_entry_type(val);
136        self
137    }
138    #[deprecated = "Use `set_epoch()` instead."]
139    pub fn epoch(&mut self, val: f64) -> &mut Self {
140        self.set_epoch(val);
141        self
142    }
143    #[deprecated = "Use `set_name()` instead."]
144    pub fn name(&mut self, val: &str) -> &mut Self {
145        self.set_name(val);
146        self
147    }
148    #[deprecated = "Use `set_origin()` instead."]
149    pub fn origin(&mut self, val: &str) -> &mut Self {
150        self.set_origin(val);
151        self
152    }
153    #[deprecated = "Use `set_start_time()` instead."]
154    pub fn start_time(&mut self, val: f64) -> &mut Self {
155        self.set_start_time(val);
156        self
157    }
158}
159impl Default for PerformanceEntryEventInit {
160    fn default() -> Self {
161        Self::new()
162    }
163}