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