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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
use super::*;
/// The HTMLMarqueeElement class.
/// [`HTMLMarqueeElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement)
#[derive(Clone, Debug, PartialEq, PartialOrd)]
#[repr(transparent)]
pub struct HTMLMarqueeElement {
inner: HTMLElement,
}
impl FromVal for HTMLMarqueeElement {
fn from_val(v: &Any) -> Self {
HTMLMarqueeElement {
inner: HTMLElement::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 HTMLMarqueeElement {
type Target = HTMLElement;
fn deref(&self) -> &Self::Target {
&self.inner
}
}
impl core::ops::DerefMut for HTMLMarqueeElement {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.inner
}
}
impl AsRef<Any> for HTMLMarqueeElement {
fn as_ref(&self) -> &Any {
&self.inner
}
}
impl AsMut<Any> for HTMLMarqueeElement {
fn as_mut(&mut self) -> &mut Any {
&mut self.inner
}
}
impl From<HTMLMarqueeElement> for Any {
fn from(s: HTMLMarqueeElement) -> Any {
let handle = s.inner.as_handle();
core::mem::forget(s);
Any::take_ownership(handle)
}
}
impl From<&HTMLMarqueeElement> for Any {
fn from(s: &HTMLMarqueeElement) -> Any {
s.inner.clone().into()
}
}
jsbind::utils::impl_dyn_cast!(HTMLMarqueeElement);
impl HTMLMarqueeElement {
/// Getter of the `behavior` attribute.
/// [`HTMLMarqueeElement.behavior`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/behavior)
pub fn behavior(&self) -> JsString {
self.inner.get("behavior").as_::<JsString>()
}
/// Setter of the `behavior` attribute.
/// [`HTMLMarqueeElement.behavior`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/behavior)
pub fn set_behavior(&mut self, value: &JsString) {
self.inner.set("behavior", value);
}
}
impl HTMLMarqueeElement {
/// Getter of the `bgColor` attribute.
/// [`HTMLMarqueeElement.bgColor`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/bgColor)
pub fn bg_color(&self) -> JsString {
self.inner.get("bgColor").as_::<JsString>()
}
/// Setter of the `bgColor` attribute.
/// [`HTMLMarqueeElement.bgColor`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/bgColor)
pub fn set_bg_color(&mut self, value: &JsString) {
self.inner.set("bgColor", value);
}
}
impl HTMLMarqueeElement {
/// Getter of the `direction` attribute.
/// [`HTMLMarqueeElement.direction`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/direction)
pub fn direction(&self) -> JsString {
self.inner.get("direction").as_::<JsString>()
}
/// Setter of the `direction` attribute.
/// [`HTMLMarqueeElement.direction`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/direction)
pub fn set_direction(&mut self, value: &JsString) {
self.inner.set("direction", value);
}
}
impl HTMLMarqueeElement {
/// Getter of the `height` attribute.
/// [`HTMLMarqueeElement.height`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/height)
pub fn height(&self) -> JsString {
self.inner.get("height").as_::<JsString>()
}
/// Setter of the `height` attribute.
/// [`HTMLMarqueeElement.height`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/height)
pub fn set_height(&mut self, value: &JsString) {
self.inner.set("height", value);
}
}
impl HTMLMarqueeElement {
/// Getter of the `hspace` attribute.
/// [`HTMLMarqueeElement.hspace`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/hspace)
pub fn hspace(&self) -> u32 {
self.inner.get("hspace").as_::<u32>()
}
/// Setter of the `hspace` attribute.
/// [`HTMLMarqueeElement.hspace`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/hspace)
pub fn set_hspace(&mut self, value: u32) {
self.inner.set("hspace", value);
}
}
impl HTMLMarqueeElement {
/// Getter of the `loop` attribute.
/// [`HTMLMarqueeElement.loop`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/loop)
pub fn loop_(&self) -> i32 {
self.inner.get("loop").as_::<i32>()
}
/// Setter of the `loop` attribute.
/// [`HTMLMarqueeElement.loop`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/loop)
pub fn set_loop_(&mut self, value: i32) {
self.inner.set("loop", value);
}
}
impl HTMLMarqueeElement {
/// Getter of the `scrollAmount` attribute.
/// [`HTMLMarqueeElement.scrollAmount`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/scrollAmount)
pub fn scroll_amount(&self) -> u32 {
self.inner.get("scrollAmount").as_::<u32>()
}
/// Setter of the `scrollAmount` attribute.
/// [`HTMLMarqueeElement.scrollAmount`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/scrollAmount)
pub fn set_scroll_amount(&mut self, value: u32) {
self.inner.set("scrollAmount", value);
}
}
impl HTMLMarqueeElement {
/// Getter of the `scrollDelay` attribute.
/// [`HTMLMarqueeElement.scrollDelay`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/scrollDelay)
pub fn scroll_delay(&self) -> u32 {
self.inner.get("scrollDelay").as_::<u32>()
}
/// Setter of the `scrollDelay` attribute.
/// [`HTMLMarqueeElement.scrollDelay`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/scrollDelay)
pub fn set_scroll_delay(&mut self, value: u32) {
self.inner.set("scrollDelay", value);
}
}
impl HTMLMarqueeElement {
/// Getter of the `trueSpeed` attribute.
/// [`HTMLMarqueeElement.trueSpeed`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/trueSpeed)
pub fn true_speed(&self) -> bool {
self.inner.get("trueSpeed").as_::<bool>()
}
/// Setter of the `trueSpeed` attribute.
/// [`HTMLMarqueeElement.trueSpeed`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/trueSpeed)
pub fn set_true_speed(&mut self, value: bool) {
self.inner.set("trueSpeed", value);
}
}
impl HTMLMarqueeElement {
/// Getter of the `vspace` attribute.
/// [`HTMLMarqueeElement.vspace`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/vspace)
pub fn vspace(&self) -> u32 {
self.inner.get("vspace").as_::<u32>()
}
/// Setter of the `vspace` attribute.
/// [`HTMLMarqueeElement.vspace`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/vspace)
pub fn set_vspace(&mut self, value: u32) {
self.inner.set("vspace", value);
}
}
impl HTMLMarqueeElement {
/// Getter of the `width` attribute.
/// [`HTMLMarqueeElement.width`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/width)
pub fn width(&self) -> JsString {
self.inner.get("width").as_::<JsString>()
}
/// Setter of the `width` attribute.
/// [`HTMLMarqueeElement.width`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/width)
pub fn set_width(&mut self, value: &JsString) {
self.inner.set("width", value);
}
}
impl HTMLMarqueeElement {
/// The `new HTMLMarqueeElement(..)` constructor, creating a new HTMLMarqueeElement instance
pub fn new() -> HTMLMarqueeElement {
Self {
inner: Any::global("HTMLMarqueeElement")
.new(&[])
.as_::<HTMLElement>(),
}
}
}
impl HTMLMarqueeElement {
/// The start method.
/// [`HTMLMarqueeElement.start`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/start)
pub fn start(&self) -> Undefined {
self.inner.call("start", &[]).as_::<Undefined>()
}
}
impl HTMLMarqueeElement {
/// The stop method.
/// [`HTMLMarqueeElement.stop`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement/stop)
pub fn stop(&self) -> Undefined {
self.inner.call("stop", &[]).as_::<Undefined>()
}
}