web_sys/features/
gen_OpenWindowEventDetail.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 = OpenWindowEventDetail)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `OpenWindowEventDetail` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
12    pub type OpenWindowEventDetail;
13    #[doc = "Get the `features` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
16    #[wasm_bindgen(method, getter = "features")]
17    pub fn get_features(this: &OpenWindowEventDetail) -> Option<::alloc::string::String>;
18    #[doc = "Change the `features` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
21    #[wasm_bindgen(method, setter = "features")]
22    pub fn set_features(this: &OpenWindowEventDetail, val: &str);
23    #[cfg(feature = "Node")]
24    #[doc = "Get the `frameElement` field of this object."]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `Node`, `OpenWindowEventDetail`*"]
27    #[wasm_bindgen(method, getter = "frameElement")]
28    pub fn get_frame_element(this: &OpenWindowEventDetail) -> Option<Node>;
29    #[cfg(feature = "Node")]
30    #[doc = "Change the `frameElement` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `Node`, `OpenWindowEventDetail`*"]
33    #[wasm_bindgen(method, setter = "frameElement")]
34    pub fn set_frame_element(this: &OpenWindowEventDetail, val: Option<&Node>);
35    #[doc = "Get the `name` field of this object."]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
38    #[wasm_bindgen(method, getter = "name")]
39    pub fn get_name(this: &OpenWindowEventDetail) -> Option<::alloc::string::String>;
40    #[doc = "Change the `name` field of this object."]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
43    #[wasm_bindgen(method, setter = "name")]
44    pub fn set_name(this: &OpenWindowEventDetail, val: &str);
45    #[doc = "Get the `url` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
48    #[wasm_bindgen(method, getter = "url")]
49    pub fn get_url(this: &OpenWindowEventDetail) -> Option<::alloc::string::String>;
50    #[doc = "Change the `url` field of this object."]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
53    #[wasm_bindgen(method, setter = "url")]
54    pub fn set_url(this: &OpenWindowEventDetail, val: &str);
55}
56impl OpenWindowEventDetail {
57    #[doc = "Construct a new `OpenWindowEventDetail`."]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
60    pub fn new() -> Self {
61        #[allow(unused_mut)]
62        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
63        ret
64    }
65    #[deprecated = "Use `set_features()` instead."]
66    pub fn features(&mut self, val: &str) -> &mut Self {
67        self.set_features(val);
68        self
69    }
70    #[cfg(feature = "Node")]
71    #[deprecated = "Use `set_frame_element()` instead."]
72    pub fn frame_element(&mut self, val: Option<&Node>) -> &mut Self {
73        self.set_frame_element(val);
74        self
75    }
76    #[deprecated = "Use `set_name()` instead."]
77    pub fn name(&mut self, val: &str) -> &mut Self {
78        self.set_name(val);
79        self
80    }
81    #[deprecated = "Use `set_url()` instead."]
82    pub fn url(&mut self, val: &str) -> &mut Self {
83        self.set_url(val);
84        self
85    }
86}
87impl Default for OpenWindowEventDetail {
88    fn default() -> Self {
89        Self::new()
90    }
91}