1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = History , typescript_type = "History")]
subst_at_vars(task)7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `History` class."]
9     #[doc = ""]
10     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History)"]
11     #[doc = ""]
12     #[doc = "*This API requires the following crate features to be activated: `History`*"]
13     pub type History;
14     # [wasm_bindgen (structural , catch , method , getter , js_class = "History" , js_name = length)]
15     #[doc = "Getter for the `length` field of this object."]
16     #[doc = ""]
17     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/length)"]
18     #[doc = ""]
19     #[doc = "*This API requires the following crate features to be activated: `History`*"]
20     pub fn length(this: &History) -> Result<u32, JsValue>;
21     #[cfg(feature = "ScrollRestoration")]
22     # [wasm_bindgen (structural , catch , method , getter , js_class = "History" , js_name = scrollRestoration)]
23     #[doc = "Getter for the `scrollRestoration` field of this object."]
24     #[doc = ""]
25     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/scrollRestoration)"]
26     #[doc = ""]
27     #[doc = "*This API requires the following crate features to be activated: `History`, `ScrollRestoration`*"]
28     pub fn scroll_restoration(this: &History) -> Result<ScrollRestoration, JsValue>;
29     #[cfg(feature = "ScrollRestoration")]
30     # [wasm_bindgen (structural , catch , method , setter , js_class = "History" , js_name = scrollRestoration)]
31     #[doc = "Setter for the `scrollRestoration` field of this object."]
32     #[doc = ""]
33     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/scrollRestoration)"]
34     #[doc = ""]
35     #[doc = "*This API requires the following crate features to be activated: `History`, `ScrollRestoration`*"]
36     pub fn set_scroll_restoration(this: &History, value: ScrollRestoration) -> Result<(), JsValue>;
37     # [wasm_bindgen (structural , catch , method , getter , js_class = "History" , js_name = state)]
38     #[doc = "Getter for the `state` field of this object."]
39     #[doc = ""]
40     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/state)"]
PKG_CONFIG_FILES(bld, pc_files, vnum=None, extra_name=None)41     #[doc = ""]
42     #[doc = "*This API requires the following crate features to be activated: `History`*"]
43     pub fn state(this: &History) -> Result<::wasm_bindgen::JsValue, JsValue>;
44     # [wasm_bindgen (catch , method , structural , js_class = "History" , js_name = back)]
45     #[doc = "The `back()` method."]
46     #[doc = ""]
47     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/back)"]
48     #[doc = ""]
49     #[doc = "*This API requires the following crate features to be activated: `History`*"]
50     pub fn back(this: &History) -> Result<(), JsValue>;
51     # [wasm_bindgen (catch , method , structural , js_class = "History" , js_name = forward)]
52     #[doc = "The `forward()` method."]
53     #[doc = ""]
54     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/forward)"]
55     #[doc = ""]
56     #[doc = "*This API requires the following crate features to be activated: `History`*"]
57     pub fn forward(this: &History) -> Result<(), JsValue>;
58     # [wasm_bindgen (catch , method , structural , js_class = "History" , js_name = go)]
59     #[doc = "The `go()` method."]
60     #[doc = ""]
61     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/go)"]
62     #[doc = ""]
63     #[doc = "*This API requires the following crate features to be activated: `History`*"]
64     pub fn go(this: &History) -> Result<(), JsValue>;
65     # [wasm_bindgen (catch , method , structural , js_class = "History" , js_name = go)]
66     #[doc = "The `go()` method."]
67     #[doc = ""]
68     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/go)"]
69     #[doc = ""]
70     #[doc = "*This API requires the following crate features to be activated: `History`*"]
71     pub fn go_with_delta(this: &History, delta: i32) -> Result<(), JsValue>;
72     # [wasm_bindgen (catch , method , structural , js_class = "History" , js_name = pushState)]
73     #[doc = "The `pushState()` method."]
74     #[doc = ""]
75     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/pushState)"]
76     #[doc = ""]
77     #[doc = "*This API requires the following crate features to be activated: `History`*"]
78     pub fn push_state(
79         this: &History,
80         data: &::wasm_bindgen::JsValue,
81         title: &str,
82     ) -> Result<(), JsValue>;
83     # [wasm_bindgen (catch , method , structural , js_class = "History" , js_name = pushState)]
84     #[doc = "The `pushState()` method."]
85     #[doc = ""]
86     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/pushState)"]
87     #[doc = ""]
88     #[doc = "*This API requires the following crate features to be activated: `History`*"]
89     pub fn push_state_with_url(
90         this: &History,
91         data: &::wasm_bindgen::JsValue,
92         title: &str,
93         url: Option<&str>,
94     ) -> Result<(), JsValue>;
95     # [wasm_bindgen (catch , method , structural , js_class = "History" , js_name = replaceState)]
96     #[doc = "The `replaceState()` method."]
97     #[doc = ""]
98     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState)"]
99     #[doc = ""]
100     #[doc = "*This API requires the following crate features to be activated: `History`*"]
101     pub fn replace_state(
102         this: &History,
103         data: &::wasm_bindgen::JsValue,
104         title: &str,
105     ) -> Result<(), JsValue>;
106     # [wasm_bindgen (catch , method , structural , js_class = "History" , js_name = replaceState)]
107     #[doc = "The `replaceState()` method."]
108     #[doc = ""]
109     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState)"]
110     #[doc = ""]
111     #[doc = "*This API requires the following crate features to be activated: `History`*"]
112     pub fn replace_state_with_url(
113         this: &History,
114         data: &::wasm_bindgen::JsValue,
115         title: &str,
116         url: Option<&str>,
117     ) -> Result<(), JsValue>;
118 }
119