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