Skip to main content

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