Skip to main content

web_sys/features/
gen_PageTransitionEvent.rs

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