Skip to main content

web_sys/features/
gen_NavigationNavigateOptions.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 = "NavigationNavigateOptions")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `NavigationNavigateOptions` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `NavigationNavigateOptions`*"]
12    pub type NavigationNavigateOptions;
13    #[doc = "Get the `info` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `NavigationNavigateOptions`*"]
16    #[wasm_bindgen(method, getter = "info")]
17    pub fn get_info(this: &NavigationNavigateOptions) -> ::wasm_bindgen::JsValue;
18    #[doc = "Change the `info` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `NavigationNavigateOptions`*"]
21    #[wasm_bindgen(method, setter = "info")]
22    pub fn set_info(this: &NavigationNavigateOptions, val: &::wasm_bindgen::JsValue);
23    #[cfg(feature = "NavigationHistoryBehavior")]
24    #[doc = "Get the `history` field of this object."]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `NavigationHistoryBehavior`, `NavigationNavigateOptions`*"]
27    #[wasm_bindgen(method, getter = "history")]
28    pub fn get_history(this: &NavigationNavigateOptions) -> Option<NavigationHistoryBehavior>;
29    #[cfg(feature = "NavigationHistoryBehavior")]
30    #[doc = "Change the `history` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `NavigationHistoryBehavior`, `NavigationNavigateOptions`*"]
33    #[wasm_bindgen(method, setter = "history")]
34    pub fn set_history(this: &NavigationNavigateOptions, val: NavigationHistoryBehavior);
35    #[doc = "Get the `state` field of this object."]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `NavigationNavigateOptions`*"]
38    #[wasm_bindgen(method, getter = "state")]
39    pub fn get_state(this: &NavigationNavigateOptions) -> ::wasm_bindgen::JsValue;
40    #[doc = "Change the `state` field of this object."]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `NavigationNavigateOptions`*"]
43    #[wasm_bindgen(method, setter = "state")]
44    pub fn set_state(this: &NavigationNavigateOptions, val: &::wasm_bindgen::JsValue);
45}
46impl NavigationNavigateOptions {
47    #[doc = "Construct a new `NavigationNavigateOptions`."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `NavigationNavigateOptions`*"]
50    pub fn new() -> Self {
51        #[allow(unused_mut)]
52        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
53        ret
54    }
55    #[deprecated = "Use `set_info()` instead."]
56    pub fn info(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
57        self.set_info(val);
58        self
59    }
60    #[cfg(feature = "NavigationHistoryBehavior")]
61    #[deprecated = "Use `set_history()` instead."]
62    pub fn history(&mut self, val: NavigationHistoryBehavior) -> &mut Self {
63        self.set_history(val);
64        self
65    }
66    #[deprecated = "Use `set_state()` instead."]
67    pub fn state(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
68        self.set_state(val);
69        self
70    }
71}
72impl Default for NavigationNavigateOptions {
73    fn default() -> Self {
74        Self::new()
75    }
76}