Skip to main content

web_sys/features/
gen_TransitionEvent.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 = "TransitionEvent",
11        typescript_type = "TransitionEvent"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `TransitionEvent` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `TransitionEvent`*"]
19    pub type TransitionEvent;
20    #[wasm_bindgen(method, getter, js_class = "TransitionEvent", js_name = "propertyName")]
21    #[doc = "Getter for the `propertyName` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent/propertyName)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `TransitionEvent`*"]
26    pub fn property_name(this: &TransitionEvent) -> ::alloc::string::String;
27    #[wasm_bindgen(method, getter, js_class = "TransitionEvent", js_name = "elapsedTime")]
28    #[doc = "Getter for the `elapsedTime` field of this object."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent/elapsedTime)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `TransitionEvent`*"]
33    pub fn elapsed_time(this: &TransitionEvent) -> f32;
34    #[wasm_bindgen(
35        method,
36        getter,
37        js_class = "TransitionEvent",
38        js_name = "pseudoElement"
39    )]
40    #[doc = "Getter for the `pseudoElement` field of this object."]
41    #[doc = ""]
42    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent/pseudoElement)"]
43    #[doc = ""]
44    #[doc = "*This API requires the following crate features to be activated: `TransitionEvent`*"]
45    pub fn pseudo_element(this: &TransitionEvent) -> ::alloc::string::String;
46    #[wasm_bindgen(catch, constructor, js_class = "TransitionEvent")]
47    #[doc = "The `new TransitionEvent(..)` constructor, creating a new instance of `TransitionEvent`."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent/TransitionEvent)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `TransitionEvent`*"]
52    pub fn new(type_: &str) -> Result<TransitionEvent, JsValue>;
53    #[cfg(feature = "TransitionEventInit")]
54    #[wasm_bindgen(catch, constructor, js_class = "TransitionEvent")]
55    #[doc = "The `new TransitionEvent(..)` constructor, creating a new instance of `TransitionEvent`."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent/TransitionEvent)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `TransitionEvent`, `TransitionEventInit`*"]
60    pub fn new_with_event_init_dict(
61        type_: &str,
62        event_init_dict: &TransitionEventInit,
63    ) -> Result<TransitionEvent, JsValue>;
64}