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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
use super::*;
/// The SVGAnimationElement class.
/// [`SVGAnimationElement`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement)
#[derive(Clone, Debug, PartialEq, PartialOrd)]
#[repr(transparent)]
pub struct SVGAnimationElement {
inner: SVGElement,
}
impl FromVal for SVGAnimationElement {
fn from_val(v: &Any) -> Self {
SVGAnimationElement {
inner: SVGElement::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 SVGAnimationElement {
type Target = SVGElement;
fn deref(&self) -> &Self::Target {
&self.inner
}
}
impl core::ops::DerefMut for SVGAnimationElement {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.inner
}
}
impl AsRef<Any> for SVGAnimationElement {
fn as_ref(&self) -> &Any {
&self.inner
}
}
impl AsMut<Any> for SVGAnimationElement {
fn as_mut(&mut self) -> &mut Any {
&mut self.inner
}
}
impl From<SVGAnimationElement> for Any {
fn from(s: SVGAnimationElement) -> Any {
let handle = s.inner.as_handle();
core::mem::forget(s);
Any::take_ownership(handle)
}
}
impl From<&SVGAnimationElement> for Any {
fn from(s: &SVGAnimationElement) -> Any {
s.inner.clone().into()
}
}
jsbind::utils::impl_dyn_cast!(SVGAnimationElement);
impl SVGAnimationElement {
/// Getter of the `targetElement` attribute.
/// [`SVGAnimationElement.targetElement`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/targetElement)
pub fn target_element(&self) -> SVGElement {
self.inner.get("targetElement").as_::<SVGElement>()
}
}
impl SVGAnimationElement {
/// Getter of the `onbegin` attribute.
/// [`SVGAnimationElement.onbegin`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/onbegin)
pub fn onbegin(&self) -> Any {
self.inner.get("onbegin").as_::<Any>()
}
/// Setter of the `onbegin` attribute.
/// [`SVGAnimationElement.onbegin`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/onbegin)
pub fn set_onbegin(&mut self, value: &Any) {
self.inner.set("onbegin", value);
}
}
impl SVGAnimationElement {
/// Getter of the `onend` attribute.
/// [`SVGAnimationElement.onend`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/onend)
pub fn onend(&self) -> Any {
self.inner.get("onend").as_::<Any>()
}
/// Setter of the `onend` attribute.
/// [`SVGAnimationElement.onend`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/onend)
pub fn set_onend(&mut self, value: &Any) {
self.inner.set("onend", value);
}
}
impl SVGAnimationElement {
/// Getter of the `onrepeat` attribute.
/// [`SVGAnimationElement.onrepeat`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/onrepeat)
pub fn onrepeat(&self) -> Any {
self.inner.get("onrepeat").as_::<Any>()
}
/// Setter of the `onrepeat` attribute.
/// [`SVGAnimationElement.onrepeat`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/onrepeat)
pub fn set_onrepeat(&mut self, value: &Any) {
self.inner.set("onrepeat", value);
}
}
impl SVGAnimationElement {
/// Getter of the `requiredExtensions` attribute.
/// [`SVGAnimationElement.requiredExtensions`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/requiredExtensions)
pub fn required_extensions(&self) -> SVGStringList {
self.inner.get("requiredExtensions").as_::<SVGStringList>()
}
}
impl SVGAnimationElement {
/// Getter of the `systemLanguage` attribute.
/// [`SVGAnimationElement.systemLanguage`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/systemLanguage)
pub fn system_language(&self) -> SVGStringList {
self.inner.get("systemLanguage").as_::<SVGStringList>()
}
}
impl SVGAnimationElement {
/// The getStartTime method.
/// [`SVGAnimationElement.getStartTime`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/getStartTime)
pub fn get_start_time(&self) -> f32 {
self.inner.call("getStartTime", &[]).as_::<f32>()
}
}
impl SVGAnimationElement {
/// The getCurrentTime method.
/// [`SVGAnimationElement.getCurrentTime`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/getCurrentTime)
pub fn get_current_time(&self) -> f32 {
self.inner.call("getCurrentTime", &[]).as_::<f32>()
}
}
impl SVGAnimationElement {
/// The getSimpleDuration method.
/// [`SVGAnimationElement.getSimpleDuration`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/getSimpleDuration)
pub fn get_simple_duration(&self) -> f32 {
self.inner.call("getSimpleDuration", &[]).as_::<f32>()
}
}
impl SVGAnimationElement {
/// The beginElement method.
/// [`SVGAnimationElement.beginElement`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/beginElement)
pub fn begin_element(&self) -> Undefined {
self.inner.call("beginElement", &[]).as_::<Undefined>()
}
}
impl SVGAnimationElement {
/// The beginElementAt method.
/// [`SVGAnimationElement.beginElementAt`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/beginElementAt)
pub fn begin_element_at(&self, offset: f32) -> Undefined {
self.inner
.call("beginElementAt", &[offset.into()])
.as_::<Undefined>()
}
}
impl SVGAnimationElement {
/// The endElement method.
/// [`SVGAnimationElement.endElement`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/endElement)
pub fn end_element(&self) -> Undefined {
self.inner.call("endElement", &[]).as_::<Undefined>()
}
}
impl SVGAnimationElement {
/// The endElementAt method.
/// [`SVGAnimationElement.endElementAt`](https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement/endElementAt)
pub fn end_element_at(&self, offset: f32) -> Undefined {
self.inner
.call("endElementAt", &[offset.into()])
.as_::<Undefined>()
}
}