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