1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
use super::*;
/// The AnimationEffect class.
/// [`AnimationEffect`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect)
#[derive(Clone, Debug, PartialEq, PartialOrd)]
#[repr(transparent)]
pub struct AnimationEffect {
inner: Any,
}
impl FromVal for AnimationEffect {
fn from_val(v: &Any) -> Self {
AnimationEffect {
inner: Any::from_val(v),
}
}
fn take_ownership(v: AnyHandle) -> Self {
Self::from_val(&Any::take_ownership(v))
}
fn as_handle(&self) -> AnyHandle {
self.inner.as_handle()
}
}
impl core::ops::Deref for AnimationEffect {
type Target = Any;
fn deref(&self) -> &Self::Target {
&self.inner
}
}
impl core::ops::DerefMut for AnimationEffect {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.inner
}
}
impl AsRef<Any> for AnimationEffect {
fn as_ref(&self) -> &Any {
&self.inner
}
}
impl AsMut<Any> for AnimationEffect {
fn as_mut(&mut self) -> &mut Any {
&mut self.inner
}
}
impl From<AnimationEffect> for Any {
fn from(s: AnimationEffect) -> Any {
let handle = s.inner.as_handle();
core::mem::forget(s);
Any::take_ownership(handle)
}
}
impl From<&AnimationEffect> for Any {
fn from(s: &AnimationEffect) -> Any {
s.inner.clone().into()
}
}
jsbind::utils::impl_dyn_cast!(AnimationEffect);
impl AnimationEffect {
/// Getter of the `parent` attribute.
/// [`AnimationEffect.parent`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/parent)
pub fn parent(&self) -> GroupEffect {
self.inner.get("parent").as_::<GroupEffect>()
}
}
impl AnimationEffect {
/// Getter of the `previousSibling` attribute.
/// [`AnimationEffect.previousSibling`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/previousSibling)
pub fn previous_sibling(&self) -> AnimationEffect {
self.inner.get("previousSibling").as_::<AnimationEffect>()
}
}
impl AnimationEffect {
/// Getter of the `nextSibling` attribute.
/// [`AnimationEffect.nextSibling`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/nextSibling)
pub fn next_sibling(&self) -> AnimationEffect {
self.inner.get("nextSibling").as_::<AnimationEffect>()
}
}
impl AnimationEffect {
/// The getTiming method.
/// [`AnimationEffect.getTiming`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/getTiming)
pub fn get_timing(&self) -> EffectTiming {
self.inner.call("getTiming", &[]).as_::<EffectTiming>()
}
}
impl AnimationEffect {
/// The getComputedTiming method.
/// [`AnimationEffect.getComputedTiming`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/getComputedTiming)
pub fn get_computed_timing(&self) -> ComputedEffectTiming {
self.inner
.call("getComputedTiming", &[])
.as_::<ComputedEffectTiming>()
}
}
impl AnimationEffect {
/// The updateTiming method.
/// [`AnimationEffect.updateTiming`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/updateTiming)
pub fn update_timing(&self) -> Undefined {
self.inner.call("updateTiming", &[]).as_::<Undefined>()
}
}
impl AnimationEffect {
/// The updateTiming method.
/// [`AnimationEffect.updateTiming`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/updateTiming)
pub fn update_timing_with_timing(&self, timing: &OptionalEffectTiming) -> Undefined {
self.inner
.call("updateTiming", &[timing.into()])
.as_::<Undefined>()
}
}
impl AnimationEffect {
/// The before method.
/// [`AnimationEffect.before`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/before)
pub fn before(&self, effects: &AnimationEffect) -> Undefined {
self.inner
.call("before", &[effects.into()])
.as_::<Undefined>()
}
}
impl AnimationEffect {
/// The after method.
/// [`AnimationEffect.after`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/after)
pub fn after(&self, effects: &AnimationEffect) -> Undefined {
self.inner
.call("after", &[effects.into()])
.as_::<Undefined>()
}
}
impl AnimationEffect {
/// The replace method.
/// [`AnimationEffect.replace`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/replace)
pub fn replace(&self, effects: &AnimationEffect) -> Undefined {
self.inner
.call("replace", &[effects.into()])
.as_::<Undefined>()
}
}
impl AnimationEffect {
/// The remove method.
/// [`AnimationEffect.remove`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/remove)
pub fn remove(&self) -> Undefined {
self.inner.call("remove", &[]).as_::<Undefined>()
}
}