web_sys/features/
gen_NavigationCurrentEntryChangeEventInit.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "NavigationCurrentEntryChangeEventInit"
10 )]
11 #[derive(Debug, Clone, PartialEq, Eq)]
12 #[doc = "The `NavigationCurrentEntryChangeEventInit` dictionary."]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `NavigationCurrentEntryChangeEventInit`*"]
15 pub type NavigationCurrentEntryChangeEventInit;
16 #[doc = "Get the `bubbles` field of this object."]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `NavigationCurrentEntryChangeEventInit`*"]
19 #[wasm_bindgen(method, getter = "bubbles")]
20 pub fn get_bubbles(this: &NavigationCurrentEntryChangeEventInit) -> Option<bool>;
21 #[doc = "Change the `bubbles` field of this object."]
22 #[doc = ""]
23 #[doc = "*This API requires the following crate features to be activated: `NavigationCurrentEntryChangeEventInit`*"]
24 #[wasm_bindgen(method, setter = "bubbles")]
25 pub fn set_bubbles(this: &NavigationCurrentEntryChangeEventInit, val: bool);
26 #[doc = "Get the `cancelable` field of this object."]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `NavigationCurrentEntryChangeEventInit`*"]
29 #[wasm_bindgen(method, getter = "cancelable")]
30 pub fn get_cancelable(this: &NavigationCurrentEntryChangeEventInit) -> Option<bool>;
31 #[doc = "Change the `cancelable` field of this object."]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `NavigationCurrentEntryChangeEventInit`*"]
34 #[wasm_bindgen(method, setter = "cancelable")]
35 pub fn set_cancelable(this: &NavigationCurrentEntryChangeEventInit, val: bool);
36 #[doc = "Get the `composed` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `NavigationCurrentEntryChangeEventInit`*"]
39 #[wasm_bindgen(method, getter = "composed")]
40 pub fn get_composed(this: &NavigationCurrentEntryChangeEventInit) -> Option<bool>;
41 #[doc = "Change the `composed` field of this object."]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `NavigationCurrentEntryChangeEventInit`*"]
44 #[wasm_bindgen(method, setter = "composed")]
45 pub fn set_composed(this: &NavigationCurrentEntryChangeEventInit, val: bool);
46 #[cfg(feature = "NavigationHistoryEntry")]
47 #[doc = "Get the `from` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `NavigationCurrentEntryChangeEventInit`, `NavigationHistoryEntry`*"]
50 #[wasm_bindgen(method, getter = "from")]
51 pub fn get_from(this: &NavigationCurrentEntryChangeEventInit) -> NavigationHistoryEntry;
52 #[cfg(feature = "NavigationHistoryEntry")]
53 #[doc = "Change the `from` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `NavigationCurrentEntryChangeEventInit`, `NavigationHistoryEntry`*"]
56 #[wasm_bindgen(method, setter = "from")]
57 pub fn set_from(this: &NavigationCurrentEntryChangeEventInit, val: &NavigationHistoryEntry);
58 #[cfg(feature = "NavigationApiType")]
59 #[doc = "Get the `navigationType` field of this object."]
60 #[doc = ""]
61 #[doc = "*This API requires the following crate features to be activated: `NavigationApiType`, `NavigationCurrentEntryChangeEventInit`*"]
62 #[wasm_bindgen(method, getter = "navigationType")]
63 pub fn get_navigation_type(
64 this: &NavigationCurrentEntryChangeEventInit,
65 ) -> Option<NavigationApiType>;
66 #[cfg(feature = "NavigationApiType")]
67 #[doc = "Change the `navigationType` field of this object."]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `NavigationApiType`, `NavigationCurrentEntryChangeEventInit`*"]
70 #[wasm_bindgen(method, setter = "navigationType")]
71 pub fn set_navigation_type(
72 this: &NavigationCurrentEntryChangeEventInit,
73 val: Option<NavigationApiType>,
74 );
75}
76impl NavigationCurrentEntryChangeEventInit {
77 #[cfg(feature = "NavigationHistoryEntry")]
78 #[doc = "Construct a new `NavigationCurrentEntryChangeEventInit`."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `NavigationCurrentEntryChangeEventInit`, `NavigationHistoryEntry`*"]
81 pub fn new(from: &NavigationHistoryEntry) -> Self {
82 #[allow(unused_mut)]
83 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
84 ret.set_from(from);
85 ret
86 }
87 #[deprecated = "Use `set_bubbles()` instead."]
88 pub fn bubbles(&mut self, val: bool) -> &mut Self {
89 self.set_bubbles(val);
90 self
91 }
92 #[deprecated = "Use `set_cancelable()` instead."]
93 pub fn cancelable(&mut self, val: bool) -> &mut Self {
94 self.set_cancelable(val);
95 self
96 }
97 #[deprecated = "Use `set_composed()` instead."]
98 pub fn composed(&mut self, val: bool) -> &mut Self {
99 self.set_composed(val);
100 self
101 }
102 #[cfg(feature = "NavigationHistoryEntry")]
103 #[deprecated = "Use `set_from()` instead."]
104 pub fn from(&mut self, val: &NavigationHistoryEntry) -> &mut Self {
105 self.set_from(val);
106 self
107 }
108 #[cfg(feature = "NavigationApiType")]
109 #[deprecated = "Use `set_navigation_type()` instead."]
110 pub fn navigation_type(&mut self, val: Option<NavigationApiType>) -> &mut Self {
111 self.set_navigation_type(val);
112 self
113 }
114}