Skip to main content

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