maxcountryman_web_sys/features/
gen_OpenWindowEventDetail.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = OpenWindowEventDetail)]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `OpenWindowEventDetail` dictionary."]
9 #[doc = ""]
10 #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
11 pub type OpenWindowEventDetail;
12}
13impl OpenWindowEventDetail {
14 #[doc = "Construct a new `OpenWindowEventDetail`."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
17 pub fn new() -> Self {
18 #[allow(unused_mut)]
19 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
20 ret
21 }
22 #[doc = "Change the `features` field of this object."]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
25 pub fn features(&mut self, val: &str) -> &mut Self {
26 use wasm_bindgen::JsValue;
27 let r = ::js_sys::Reflect::set(
28 self.as_ref(),
29 &JsValue::from("features"),
30 &JsValue::from(val),
31 );
32 debug_assert!(
33 r.is_ok(),
34 "setting properties should never fail on our dictionary objects"
35 );
36 let _ = r;
37 self
38 }
39 #[cfg(feature = "Node")]
40 #[doc = "Change the `frameElement` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `Node`, `OpenWindowEventDetail`*"]
43 pub fn frame_element(&mut self, val: Option<&Node>) -> &mut Self {
44 use wasm_bindgen::JsValue;
45 let r = ::js_sys::Reflect::set(
46 self.as_ref(),
47 &JsValue::from("frameElement"),
48 &JsValue::from(val),
49 );
50 debug_assert!(
51 r.is_ok(),
52 "setting properties should never fail on our dictionary objects"
53 );
54 let _ = r;
55 self
56 }
57 #[doc = "Change the `name` field of this object."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
60 pub fn name(&mut self, val: &str) -> &mut Self {
61 use wasm_bindgen::JsValue;
62 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
63 debug_assert!(
64 r.is_ok(),
65 "setting properties should never fail on our dictionary objects"
66 );
67 let _ = r;
68 self
69 }
70 #[doc = "Change the `url` field of this object."]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"]
73 pub fn url(&mut self, val: &str) -> &mut Self {
74 use wasm_bindgen::JsValue;
75 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("url"), &JsValue::from(val));
76 debug_assert!(
77 r.is_ok(),
78 "setting properties should never fail on our dictionary objects"
79 );
80 let _ = r;
81 self
82 }
83}
84impl Default for OpenWindowEventDetail {
85 fn default() -> Self {
86 Self::new()
87 }
88}