1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[wasm_bindgen] 5 extern "C" { 6 # [wasm_bindgen (extends = UiEvent , extends = Event , extends = :: js_sys :: Object , js_name = FocusEvent , typescript_type = "FocusEvent")] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `FocusEvent` class."] 9 #[doc = ""] 10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent)"] 11 #[doc = ""] 12 #[doc = "*This API requires the following crate features to be activated: `FocusEvent`*"] 13 pub type FocusEvent; 14 #[cfg(feature = "EventTarget")] 15 # [wasm_bindgen (structural , method , getter , js_class = "FocusEvent" , js_name = relatedTarget)] 16 #[doc = "Getter for the `relatedTarget` field of this object."] 17 #[doc = ""] 18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/relatedTarget)"] 19 #[doc = ""] 20 #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `FocusEvent`*"] related_target(this: &FocusEvent) -> Option<EventTarget>21 pub fn related_target(this: &FocusEvent) -> Option<EventTarget>; 22 #[wasm_bindgen(catch, constructor, js_class = "FocusEvent")] 23 #[doc = "The `new FocusEvent(..)` constructor, creating a new instance of `FocusEvent`."] 24 #[doc = ""] 25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)"] 26 #[doc = ""] 27 #[doc = "*This API requires the following crate features to be activated: `FocusEvent`*"] new(type_arg: &str) -> Result<FocusEvent, JsValue>28 pub fn new(type_arg: &str) -> Result<FocusEvent, JsValue>; 29 #[cfg(feature = "FocusEventInit")] 30 #[wasm_bindgen(catch, constructor, js_class = "FocusEvent")] 31 #[doc = "The `new FocusEvent(..)` constructor, creating a new instance of `FocusEvent`."] 32 #[doc = ""] 33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)"] 34 #[doc = ""] 35 #[doc = "*This API requires the following crate features to be activated: `FocusEvent`, `FocusEventInit`*"] new_with_focus_event_init_dict( type_arg: &str, focus_event_init_dict: &FocusEventInit, ) -> Result<FocusEvent, JsValue>36 pub fn new_with_focus_event_init_dict( 37 type_arg: &str, 38 focus_event_init_dict: &FocusEventInit, 39 ) -> Result<FocusEvent, JsValue>; 40 } 41