web_sys/features/
gen_PopStateEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = PopStateEvent , typescript_type = "PopStateEvent")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `PopStateEvent` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PopStateEvent)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `PopStateEvent`*"]
14 pub type PopStateEvent;
15 # [wasm_bindgen (structural , method , getter , js_class = "PopStateEvent" , js_name = state)]
16 #[doc = "Getter for the `state` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PopStateEvent/state)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `PopStateEvent`*"]
21 pub fn state(this: &PopStateEvent) -> ::wasm_bindgen::JsValue;
22 #[wasm_bindgen(catch, constructor, js_class = "PopStateEvent")]
23 #[doc = "The `new PopStateEvent(..)` constructor, creating a new instance of `PopStateEvent`."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PopStateEvent/PopStateEvent)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `PopStateEvent`*"]
28 pub fn new(type_: &str) -> Result<PopStateEvent, JsValue>;
29 #[cfg(feature = "PopStateEventInit")]
30 #[wasm_bindgen(catch, constructor, js_class = "PopStateEvent")]
31 #[doc = "The `new PopStateEvent(..)` constructor, creating a new instance of `PopStateEvent`."]
32 #[doc = ""]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PopStateEvent/PopStateEvent)"]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `PopStateEvent`, `PopStateEventInit`*"]
36 pub fn new_with_event_init_dict(
37 type_: &str,
38 event_init_dict: &PopStateEventInit,
39 ) -> Result<PopStateEvent, JsValue>;
40}