| 1 | #![allow (unused_imports)] |
| 2 | #![allow (clippy::all)] |
| 3 | use super::*; |
| 4 | use wasm_bindgen::prelude::*; |
| 5 | #[wasm_bindgen ] |
| 6 | unsafeextern "C" { |
| 7 | # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ResizeObserverOptions)] |
| 8 | #[derive (Debug, Clone, PartialEq, Eq)] |
| 9 | #[doc = "The `ResizeObserverOptions` dictionary." ] |
| 10 | #[doc = "" ] |
| 11 | #[doc = "*This API requires the following crate features to be activated: `ResizeObserverOptions`*" ] |
| 12 | pub type ResizeObserverOptions; |
| 13 | #[cfg (feature = "ResizeObserverBoxOptions" )] |
| 14 | #[doc = "Get the `box` field of this object." ] |
| 15 | #[doc = "" ] |
| 16 | #[doc = "*This API requires the following crate features to be activated: `ResizeObserverBoxOptions`, `ResizeObserverOptions`*" ] |
| 17 | #[wasm_bindgen (method, getter = "box" )] |
| 18 | pub unsafefn get_box(this: &ResizeObserverOptions) -> Option<ResizeObserverBoxOptions>; |
| 19 | #[cfg (feature = "ResizeObserverBoxOptions" )] |
| 20 | #[doc = "Change the `box` field of this object." ] |
| 21 | #[doc = "" ] |
| 22 | #[doc = "*This API requires the following crate features to be activated: `ResizeObserverBoxOptions`, `ResizeObserverOptions`*" ] |
| 23 | #[wasm_bindgen (method, setter = "box" )] |
| 24 | pub unsafefn set_box(this: &ResizeObserverOptions, val: ResizeObserverBoxOptions); |
| 25 | } |
| 26 | impl ResizeObserverOptions { |
| 27 | #[doc = "Construct a new `ResizeObserverOptions`." ] |
| 28 | #[doc = "" ] |
| 29 | #[doc = "*This API requires the following crate features to be activated: `ResizeObserverOptions`*" ] |
| 30 | pub fn new() -> Self { |
| 31 | #[allow (unused_mut)] |
| 32 | let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); |
| 33 | ret |
| 34 | } |
| 35 | #[cfg (feature = "ResizeObserverBoxOptions" )] |
| 36 | #[deprecated = "Use `set_box()` instead." ] |
| 37 | pub fn box_(&mut self, val: ResizeObserverBoxOptions) -> &mut Self { |
| 38 | self.set_box(val); |
| 39 | self |
| 40 | } |
| 41 | } |
| 42 | impl Default for ResizeObserverOptions { |
| 43 | fn default() -> Self { |
| 44 | Self::new() |
| 45 | } |
| 46 | } |
| 47 | |