web_sys/features/
gen_PerformanceObserverInit.rs1#![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 = PerformanceObserverInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `PerformanceObserverInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"]
12 pub type PerformanceObserverInit;
13 #[doc = "Get the `buffered` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"]
16 #[wasm_bindgen(method, getter = "buffered")]
17 pub fn get_buffered(this: &PerformanceObserverInit) -> Option<bool>;
18 #[doc = "Change the `buffered` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"]
21 #[wasm_bindgen(method, setter = "buffered")]
22 pub fn set_buffered(this: &PerformanceObserverInit, val: bool);
23 #[doc = "Get the `entryTypes` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"]
26 #[wasm_bindgen(method, getter = "entryTypes")]
27 pub fn get_entry_types(this: &PerformanceObserverInit) -> ::js_sys::Array;
28 #[doc = "Change the `entryTypes` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"]
31 #[wasm_bindgen(method, setter = "entryTypes")]
32 pub fn set_entry_types(this: &PerformanceObserverInit, val: &::wasm_bindgen::JsValue);
33}
34impl PerformanceObserverInit {
35 #[doc = "Construct a new `PerformanceObserverInit`."]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"]
38 pub fn new(entry_types: &::wasm_bindgen::JsValue) -> Self {
39 #[allow(unused_mut)]
40 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
41 ret.set_entry_types(entry_types);
42 ret
43 }
44 #[deprecated = "Use `set_buffered()` instead."]
45 pub fn buffered(&mut self, val: bool) -> &mut Self {
46 self.set_buffered(val);
47 self
48 }
49 #[deprecated = "Use `set_entry_types()` instead."]
50 pub fn entry_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
51 self.set_entry_types(val);
52 self
53 }
54}