maxcountryman_web_sys/features/
gen_Performance.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = Performance , typescript_type = "Performance")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `Performance` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
13 pub type Performance;
14 # [wasm_bindgen (structural , method , getter , js_class = "Performance" , js_name = timeOrigin)]
15 #[doc = "Getter for the `timeOrigin` field of this object."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
20 pub fn time_origin(this: &Performance) -> f64;
21 #[cfg(feature = "PerformanceTiming")]
22 # [wasm_bindgen (structural , method , getter , js_class = "Performance" , js_name = timing)]
23 #[doc = "Getter for the `timing` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timing)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `Performance`, `PerformanceTiming`*"]
28 pub fn timing(this: &Performance) -> PerformanceTiming;
29 #[cfg(feature = "PerformanceNavigation")]
30 # [wasm_bindgen (structural , method , getter , js_class = "Performance" , js_name = navigation)]
31 #[doc = "Getter for the `navigation` field of this object."]
32 #[doc = ""]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/navigation)"]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `Performance`, `PerformanceNavigation`*"]
36 pub fn navigation(this: &Performance) -> PerformanceNavigation;
37 # [wasm_bindgen (structural , method , getter , js_class = "Performance" , js_name = onresourcetimingbufferfull)]
38 #[doc = "Getter for the `onresourcetimingbufferfull` field of this object."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/onresourcetimingbufferfull)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
43 pub fn onresourcetimingbufferfull(this: &Performance) -> Option<::js_sys::Function>;
44 # [wasm_bindgen (structural , method , setter , js_class = "Performance" , js_name = onresourcetimingbufferfull)]
45 #[doc = "Setter for the `onresourcetimingbufferfull` field of this object."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/onresourcetimingbufferfull)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
50 pub fn set_onresourcetimingbufferfull(this: &Performance, value: Option<&::js_sys::Function>);
51 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = clearMarks)]
52 #[doc = "The `clearMarks()` method."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMarks)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
57 pub fn clear_marks(this: &Performance);
58 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = clearMarks)]
59 #[doc = "The `clearMarks()` method."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMarks)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
64 pub fn clear_marks_with_mark_name(this: &Performance, mark_name: &str);
65 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = clearMeasures)]
66 #[doc = "The `clearMeasures()` method."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMeasures)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
71 pub fn clear_measures(this: &Performance);
72 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = clearMeasures)]
73 #[doc = "The `clearMeasures()` method."]
74 #[doc = ""]
75 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMeasures)"]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
78 pub fn clear_measures_with_measure_name(this: &Performance, measure_name: &str);
79 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = clearResourceTimings)]
80 #[doc = "The `clearResourceTimings()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearResourceTimings)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
85 pub fn clear_resource_timings(this: &Performance);
86 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = getEntries)]
87 #[doc = "The `getEntries()` method."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntries)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
92 pub fn get_entries(this: &Performance) -> ::js_sys::Array;
93 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = getEntriesByName)]
94 #[doc = "The `getEntriesByName()` method."]
95 #[doc = ""]
96 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByName)"]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
99 pub fn get_entries_by_name(this: &Performance, name: &str) -> ::js_sys::Array;
100 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = getEntriesByName)]
101 #[doc = "The `getEntriesByName()` method."]
102 #[doc = ""]
103 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByName)"]
104 #[doc = ""]
105 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
106 pub fn get_entries_by_name_with_entry_type(
107 this: &Performance,
108 name: &str,
109 entry_type: &str,
110 ) -> ::js_sys::Array;
111 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = getEntriesByType)]
112 #[doc = "The `getEntriesByType()` method."]
113 #[doc = ""]
114 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByType)"]
115 #[doc = ""]
116 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
117 pub fn get_entries_by_type(this: &Performance, entry_type: &str) -> ::js_sys::Array;
118 # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = mark)]
119 #[doc = "The `mark()` method."]
120 #[doc = ""]
121 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark)"]
122 #[doc = ""]
123 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
124 pub fn mark(this: &Performance, mark_name: &str) -> Result<(), JsValue>;
125 # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = measure)]
126 #[doc = "The `measure()` method."]
127 #[doc = ""]
128 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)"]
129 #[doc = ""]
130 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
131 pub fn measure(this: &Performance, measure_name: &str) -> Result<(), JsValue>;
132 # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = measure)]
133 #[doc = "The `measure()` method."]
134 #[doc = ""]
135 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)"]
136 #[doc = ""]
137 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
138 pub fn measure_with_start_mark(
139 this: &Performance,
140 measure_name: &str,
141 start_mark: &str,
142 ) -> Result<(), JsValue>;
143 # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = measure)]
144 #[doc = "The `measure()` method."]
145 #[doc = ""]
146 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)"]
147 #[doc = ""]
148 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
149 pub fn measure_with_start_mark_and_end_mark(
150 this: &Performance,
151 measure_name: &str,
152 start_mark: &str,
153 end_mark: &str,
154 ) -> Result<(), JsValue>;
155 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = now)]
156 #[doc = "The `now()` method."]
157 #[doc = ""]
158 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now)"]
159 #[doc = ""]
160 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
161 pub fn now(this: &Performance) -> f64;
162 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = setResourceTimingBufferSize)]
163 #[doc = "The `setResourceTimingBufferSize()` method."]
164 #[doc = ""]
165 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/setResourceTimingBufferSize)"]
166 #[doc = ""]
167 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
168 pub fn set_resource_timing_buffer_size(this: &Performance, max_size: u32);
169 # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = toJSON)]
170 #[doc = "The `toJSON()` method."]
171 #[doc = ""]
172 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/toJSON)"]
173 #[doc = ""]
174 #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
175 pub fn to_json(this: &Performance) -> ::js_sys::Object;
176}