|
| 1 | +#![allow(unused_imports)] |
| 2 | +#![allow(clippy::all)] |
| 3 | +use super::*; |
| 4 | +use wasm_bindgen::prelude::*; |
| 5 | +#[wasm_bindgen] |
| 6 | +extern "C" { |
| 7 | + # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FocusOptions)] |
| 8 | + #[derive(Debug, Clone, PartialEq, Eq)] |
| 9 | + #[doc = "The `FocusOptions` dictionary."] |
| 10 | + #[doc = ""] |
| 11 | + #[doc = "*This API requires the following crate features to be activated: `FocusOptions`*"] |
| 12 | + pub type FocusOptions; |
| 13 | + #[wasm_bindgen(method, setter = "focusVisible")] |
| 14 | + fn focus_visible_shim(this: &FocusOptions, val: bool); |
| 15 | + #[wasm_bindgen(method, setter = "preventScroll")] |
| 16 | + fn prevent_scroll_shim(this: &FocusOptions, val: bool); |
| 17 | +} |
| 18 | +impl FocusOptions { |
| 19 | + #[doc = "Construct a new `FocusOptions`."] |
| 20 | + #[doc = ""] |
| 21 | + #[doc = "*This API requires the following crate features to be activated: `FocusOptions`*"] |
| 22 | + pub fn new() -> Self { |
| 23 | + #[allow(unused_mut)] |
| 24 | + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); |
| 25 | + ret |
| 26 | + } |
| 27 | + #[doc = "Change the `focusVisible` field of this object."] |
| 28 | + #[doc = ""] |
| 29 | + #[doc = "*This API requires the following crate features to be activated: `FocusOptions`*"] |
| 30 | + pub fn focus_visible(&mut self, val: bool) -> &mut Self { |
| 31 | + self.focus_visible_shim(val); |
| 32 | + self |
| 33 | + } |
| 34 | + #[doc = "Change the `preventScroll` field of this object."] |
| 35 | + #[doc = ""] |
| 36 | + #[doc = "*This API requires the following crate features to be activated: `FocusOptions`*"] |
| 37 | + pub fn prevent_scroll(&mut self, val: bool) -> &mut Self { |
| 38 | + self.prevent_scroll_shim(val); |
| 39 | + self |
| 40 | + } |
| 41 | +} |
| 42 | +impl Default for FocusOptions { |
| 43 | + fn default() -> Self { |
| 44 | + Self::new() |
| 45 | + } |
| 46 | +} |
0 commit comments