maxcountryman_web_sys/features/
gen_PerformanceObserver.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = PerformanceObserver , typescript_type = "PerformanceObserver")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `PerformanceObserver` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `PerformanceObserver`*"]
13 pub type PerformanceObserver;
14 #[wasm_bindgen(catch, constructor, js_class = "PerformanceObserver")]
15 #[doc = "The `new PerformanceObserver(..)` constructor, creating a new instance of `PerformanceObserver`."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/PerformanceObserver)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `PerformanceObserver`*"]
20 pub fn new(callback: &::js_sys::Function) -> Result<PerformanceObserver, JsValue>;
21 # [wasm_bindgen (method , structural , js_class = "PerformanceObserver" , js_name = disconnect)]
22 #[doc = "The `disconnect()` method."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/disconnect)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `PerformanceObserver`*"]
27 pub fn disconnect(this: &PerformanceObserver);
28 #[cfg(feature = "PerformanceObserverInit")]
29 # [wasm_bindgen (method , structural , js_class = "PerformanceObserver" , js_name = observe)]
30 #[doc = "The `observe()` method."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/observe)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `PerformanceObserver`, `PerformanceObserverInit`*"]
35 pub fn observe(this: &PerformanceObserver, options: &PerformanceObserverInit);
36 # [wasm_bindgen (method , structural , js_class = "PerformanceObserver" , js_name = takeRecords)]
37 #[doc = "The `takeRecords()` method."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/takeRecords)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `PerformanceObserver`*"]
42 pub fn take_records(this: &PerformanceObserver) -> ::js_sys::Array;
43}