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