html/generated/
source.rs

1pub mod element {
2    /// The HTML `<source>` element
3    ///
4    /// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source)
5    #[doc(alias = "source")]
6    #[non_exhaustive]
7    #[derive(PartialEq, Clone, Default)]
8    pub struct MediaSource {
9        sys: html_sys::embedded::MediaSource,
10    }
11    impl MediaSource {
12        /// Create a new builder
13        pub fn builder() -> super::builder::MediaSourceBuilder {
14            super::builder::MediaSourceBuilder::new(Default::default())
15        }
16    }
17    impl MediaSource {
18        /// Access the element's `data-*` properties
19        pub fn data_map(&self) -> &html_sys::DataMap {
20            &self.sys.data_map
21        }
22        /// Mutably access the element's `data-*` properties
23        pub fn data_map_mut(&mut self) -> &mut html_sys::DataMap {
24            &mut self.sys.data_map
25        }
26    }
27    impl MediaSource {
28        /// Get the value of the `type` attribute
29        pub fn type_(&self) -> std::option::Option<&str> {
30            self.sys.type_.as_deref()
31        }
32        /// Set the value of the `type` attribute
33        pub fn set_type_(
34            &mut self,
35            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
36        ) {
37            self.sys.type_ = value.map(|v| v.into());
38        }
39        /// Get the value of the `media` attribute
40        pub fn media(&self) -> std::option::Option<&str> {
41            self.sys.media.as_deref()
42        }
43        /// Set the value of the `media` attribute
44        pub fn set_media(
45            &mut self,
46            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
47        ) {
48            self.sys.media = value.map(|v| v.into());
49        }
50        /// Get the value of the `src` attribute
51        pub fn src(&self) -> std::option::Option<&str> {
52            self.sys.src.as_deref()
53        }
54        /// Set the value of the `src` attribute
55        pub fn set_src(
56            &mut self,
57            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
58        ) {
59            self.sys.src = value.map(|v| v.into());
60        }
61        /// Get the value of the `srcset` attribute
62        pub fn srcset(&self) -> std::option::Option<&str> {
63            self.sys.srcset.as_deref()
64        }
65        /// Set the value of the `srcset` attribute
66        pub fn set_srcset(
67            &mut self,
68            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
69        ) {
70            self.sys.srcset = value.map(|v| v.into());
71        }
72        /// Get the value of the `sizes` attribute
73        pub fn sizes(&self) -> std::option::Option<&str> {
74            self.sys.sizes.as_deref()
75        }
76        /// Set the value of the `sizes` attribute
77        pub fn set_sizes(
78            &mut self,
79            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
80        ) {
81            self.sys.sizes = value.map(|v| v.into());
82        }
83        /// Get the value of the `width` attribute
84        pub fn width(&self) -> std::option::Option<i64> {
85            self.sys.width
86        }
87        /// Set the value of the `width` attribute
88        pub fn set_width(&mut self, value: std::option::Option<i64>) {
89            self.sys.width = value;
90        }
91        /// Get the value of the `height` attribute
92        pub fn height(&self) -> std::option::Option<i64> {
93            self.sys.height
94        }
95        /// Set the value of the `height` attribute
96        pub fn set_height(&mut self, value: std::option::Option<i64>) {
97            self.sys.height = value;
98        }
99        /// Get the value of the `accesskey` attribute
100        pub fn access_key(&self) -> std::option::Option<&str> {
101            self.sys.access_key.as_deref()
102        }
103        /// Set the value of the `accesskey` attribute
104        pub fn set_access_key(
105            &mut self,
106            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
107        ) {
108            self.sys.access_key = value.map(|v| v.into());
109        }
110        /// Get the value of the `autocapitalize` attribute
111        pub fn auto_capitalize(&self) -> std::option::Option<&str> {
112            self.sys.auto_capitalize.as_deref()
113        }
114        /// Set the value of the `autocapitalize` attribute
115        pub fn set_auto_capitalize(
116            &mut self,
117            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
118        ) {
119            self.sys.auto_capitalize = value.map(|v| v.into());
120        }
121        /// Get the value of the `autofocus` attribute
122        pub fn autofocus(&self) -> bool {
123            self.sys.autofocus
124        }
125        /// Set the value of the `autofocus` attribute
126        pub fn set_autofocus(&mut self, value: bool) {
127            self.sys.autofocus = value;
128        }
129        /// Get the value of the `class` attribute
130        pub fn class(&self) -> std::option::Option<&str> {
131            self.sys.class.as_deref()
132        }
133        /// Set the value of the `class` attribute
134        pub fn set_class(
135            &mut self,
136            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
137        ) {
138            self.sys.class = value.map(|v| v.into());
139        }
140        /// Get the value of the `contenteditable` attribute
141        pub fn content_editable(&self) -> std::option::Option<&str> {
142            self.sys.content_editable.as_deref()
143        }
144        /// Set the value of the `contenteditable` attribute
145        pub fn set_content_editable(
146            &mut self,
147            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
148        ) {
149            self.sys.content_editable = value.map(|v| v.into());
150        }
151        /// Get the value of the `dir` attribute
152        pub fn direction(&self) -> std::option::Option<&str> {
153            self.sys.direction.as_deref()
154        }
155        /// Set the value of the `dir` attribute
156        pub fn set_direction(
157            &mut self,
158            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
159        ) {
160            self.sys.direction = value.map(|v| v.into());
161        }
162        /// Get the value of the `draggable` attribute
163        pub fn draggable(&self) -> bool {
164            self.sys.draggable
165        }
166        /// Set the value of the `draggable` attribute
167        pub fn set_draggable(&mut self, value: bool) {
168            self.sys.draggable = value;
169        }
170        /// Get the value of the `enterkeyhint` attribute
171        pub fn enter_key_hint(&self) -> std::option::Option<&str> {
172            self.sys.enter_key_hint.as_deref()
173        }
174        /// Set the value of the `enterkeyhint` attribute
175        pub fn set_enter_key_hint(
176            &mut self,
177            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
178        ) {
179            self.sys.enter_key_hint = value.map(|v| v.into());
180        }
181        /// Get the value of the `exportparts` attribute
182        pub fn export_parts(&self) -> std::option::Option<&str> {
183            self.sys.export_parts.as_deref()
184        }
185        /// Set the value of the `exportparts` attribute
186        pub fn set_export_parts(
187            &mut self,
188            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
189        ) {
190            self.sys.export_parts = value.map(|v| v.into());
191        }
192        /// Get the value of the `hidden` attribute
193        pub fn hidden(&self) -> std::option::Option<&str> {
194            self.sys.hidden.as_deref()
195        }
196        /// Set the value of the `hidden` attribute
197        pub fn set_hidden(
198            &mut self,
199            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
200        ) {
201            self.sys.hidden = value.map(|v| v.into());
202        }
203        /// Get the value of the `id` attribute
204        pub fn id(&self) -> std::option::Option<&str> {
205            self.sys.id.as_deref()
206        }
207        /// Set the value of the `id` attribute
208        pub fn set_id(
209            &mut self,
210            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
211        ) {
212            self.sys.id = value.map(|v| v.into());
213        }
214        /// Get the value of the `inert` attribute
215        pub fn inert(&self) -> bool {
216            self.sys.inert
217        }
218        /// Set the value of the `inert` attribute
219        pub fn set_inert(&mut self, value: bool) {
220            self.sys.inert = value;
221        }
222        /// Get the value of the `inputmode` attribute
223        pub fn input_mode(&self) -> std::option::Option<&str> {
224            self.sys.input_mode.as_deref()
225        }
226        /// Set the value of the `inputmode` attribute
227        pub fn set_input_mode(
228            &mut self,
229            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
230        ) {
231            self.sys.input_mode = value.map(|v| v.into());
232        }
233        /// Get the value of the `is` attribute
234        pub fn is_(&self) -> std::option::Option<&str> {
235            self.sys.is_.as_deref()
236        }
237        /// Set the value of the `is` attribute
238        pub fn set_is_(
239            &mut self,
240            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
241        ) {
242            self.sys.is_ = value.map(|v| v.into());
243        }
244        /// Get the value of the `itemid` attribute
245        pub fn item_id(&self) -> std::option::Option<&str> {
246            self.sys.item_id.as_deref()
247        }
248        /// Set the value of the `itemid` attribute
249        pub fn set_item_id(
250            &mut self,
251            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
252        ) {
253            self.sys.item_id = value.map(|v| v.into());
254        }
255        /// Get the value of the `itemprop` attribute
256        pub fn item_prop(&self) -> std::option::Option<&str> {
257            self.sys.item_prop.as_deref()
258        }
259        /// Set the value of the `itemprop` attribute
260        pub fn set_item_prop(
261            &mut self,
262            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
263        ) {
264            self.sys.item_prop = value.map(|v| v.into());
265        }
266        /// Get the value of the `itemref` attribute
267        pub fn item_ref(&self) -> std::option::Option<&str> {
268            self.sys.item_ref.as_deref()
269        }
270        /// Set the value of the `itemref` attribute
271        pub fn set_item_ref(
272            &mut self,
273            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
274        ) {
275            self.sys.item_ref = value.map(|v| v.into());
276        }
277        /// Get the value of the `itemscope` attribute
278        pub fn item_scope(&self) -> std::option::Option<&str> {
279            self.sys.item_scope.as_deref()
280        }
281        /// Set the value of the `itemscope` attribute
282        pub fn set_item_scope(
283            &mut self,
284            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
285        ) {
286            self.sys.item_scope = value.map(|v| v.into());
287        }
288        /// Get the value of the `itemtype` attribute
289        pub fn item_type(&self) -> std::option::Option<&str> {
290            self.sys.item_type.as_deref()
291        }
292        /// Set the value of the `itemtype` attribute
293        pub fn set_item_type(
294            &mut self,
295            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
296        ) {
297            self.sys.item_type = value.map(|v| v.into());
298        }
299        /// Get the value of the `lang` attribute
300        pub fn lang(&self) -> std::option::Option<&str> {
301            self.sys.lang.as_deref()
302        }
303        /// Set the value of the `lang` attribute
304        pub fn set_lang(
305            &mut self,
306            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
307        ) {
308            self.sys.lang = value.map(|v| v.into());
309        }
310        /// Get the value of the `nonce` attribute
311        pub fn nonce(&self) -> std::option::Option<&str> {
312            self.sys.nonce.as_deref()
313        }
314        /// Set the value of the `nonce` attribute
315        pub fn set_nonce(
316            &mut self,
317            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
318        ) {
319            self.sys.nonce = value.map(|v| v.into());
320        }
321        /// Get the value of the `part` attribute
322        pub fn part(&self) -> std::option::Option<&str> {
323            self.sys.part.as_deref()
324        }
325        /// Set the value of the `part` attribute
326        pub fn set_part(
327            &mut self,
328            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
329        ) {
330            self.sys.part = value.map(|v| v.into());
331        }
332        /// Get the value of the `slot` attribute
333        pub fn slot(&self) -> std::option::Option<&str> {
334            self.sys.slot.as_deref()
335        }
336        /// Set the value of the `slot` attribute
337        pub fn set_slot(
338            &mut self,
339            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
340        ) {
341            self.sys.slot = value.map(|v| v.into());
342        }
343        /// Get the value of the `spellcheck` attribute
344        pub fn spellcheck(&self) -> std::option::Option<&str> {
345            self.sys.spellcheck.as_deref()
346        }
347        /// Set the value of the `spellcheck` attribute
348        pub fn set_spellcheck(
349            &mut self,
350            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
351        ) {
352            self.sys.spellcheck = value.map(|v| v.into());
353        }
354        /// Get the value of the `style` attribute
355        pub fn style(&self) -> std::option::Option<&str> {
356            self.sys.style.as_deref()
357        }
358        /// Set the value of the `style` attribute
359        pub fn set_style(
360            &mut self,
361            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
362        ) {
363            self.sys.style = value.map(|v| v.into());
364        }
365        /// Get the value of the `tabindex` attribute
366        pub fn tab_index(&self) -> std::option::Option<i64> {
367            self.sys.tab_index
368        }
369        /// Set the value of the `tabindex` attribute
370        pub fn set_tab_index(&mut self, value: std::option::Option<i64>) {
371            self.sys.tab_index = value;
372        }
373        /// Get the value of the `title` attribute
374        pub fn title(&self) -> std::option::Option<&str> {
375            self.sys.title.as_deref()
376        }
377        /// Set the value of the `title` attribute
378        pub fn set_title(
379            &mut self,
380            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
381        ) {
382            self.sys.title = value.map(|v| v.into());
383        }
384        /// Get the value of the `translate` attribute
385        pub fn translate(&self) -> bool {
386            self.sys.translate
387        }
388        /// Set the value of the `translate` attribute
389        pub fn set_translate(&mut self, value: bool) {
390            self.sys.translate = value;
391        }
392    }
393    impl crate::Render for MediaSource {
394        fn render(
395            &self,
396            f: &mut std::fmt::Formatter<'_>,
397            depth: usize,
398        ) -> std::fmt::Result {
399            write!(f, "{:level$}", "", level = depth * 4)?;
400            html_sys::RenderElement::write_opening_tag(&self.sys, f)?;
401            Ok(())
402        }
403    }
404    impl std::fmt::Debug for MediaSource {
405        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
406            crate::Render::render(self, f, 0)?;
407            Ok(())
408        }
409    }
410    impl std::fmt::Display for MediaSource {
411        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
412            html_sys::RenderElement::write_opening_tag(&self.sys, f)?;
413            html_sys::RenderElement::write_closing_tag(&self.sys, f)?;
414            Ok(())
415        }
416    }
417    impl crate::HtmlElement for MediaSource {}
418    impl std::convert::Into<html_sys::embedded::MediaSource> for MediaSource {
419        fn into(self) -> html_sys::embedded::MediaSource {
420            self.sys
421        }
422    }
423    impl From<html_sys::embedded::MediaSource> for MediaSource {
424        fn from(sys: html_sys::embedded::MediaSource) -> Self {
425            Self { sys }
426        }
427    }
428}
429pub mod child {}
430pub mod builder {
431    /// A builder struct for MediaSource
432    pub struct MediaSourceBuilder {
433        element: super::element::MediaSource,
434    }
435    impl MediaSourceBuilder {
436        pub(crate) fn new(element: super::element::MediaSource) -> Self {
437            Self { element }
438        }
439        /// Finish building the element
440        pub fn build(&mut self) -> super::element::MediaSource {
441            self.element.clone()
442        }
443        /// Insert a `data-*` property
444        pub fn data(
445            &mut self,
446            data_key: impl Into<std::borrow::Cow<'static, str>>,
447            value: impl Into<std::borrow::Cow<'static, str>>,
448        ) -> &mut MediaSourceBuilder {
449            self.element.data_map_mut().insert(data_key.into(), value.into());
450            self
451        }
452        /// Set the value of the `type` attribute
453        pub fn type_(
454            &mut self,
455            value: impl Into<std::borrow::Cow<'static, str>>,
456        ) -> &mut Self {
457            self.element.set_type_(Some(value.into()));
458            self
459        }
460        /// Set the value of the `media` attribute
461        pub fn media(
462            &mut self,
463            value: impl Into<std::borrow::Cow<'static, str>>,
464        ) -> &mut Self {
465            self.element.set_media(Some(value.into()));
466            self
467        }
468        /// Set the value of the `src` attribute
469        pub fn src(
470            &mut self,
471            value: impl Into<std::borrow::Cow<'static, str>>,
472        ) -> &mut Self {
473            self.element.set_src(Some(value.into()));
474            self
475        }
476        /// Set the value of the `srcset` attribute
477        pub fn srcset(
478            &mut self,
479            value: impl Into<std::borrow::Cow<'static, str>>,
480        ) -> &mut Self {
481            self.element.set_srcset(Some(value.into()));
482            self
483        }
484        /// Set the value of the `sizes` attribute
485        pub fn sizes(
486            &mut self,
487            value: impl Into<std::borrow::Cow<'static, str>>,
488        ) -> &mut Self {
489            self.element.set_sizes(Some(value.into()));
490            self
491        }
492        /// Set the value of the `width` attribute
493        pub fn width(&mut self, value: i64) -> &mut Self {
494            self.element.set_width(Some(value));
495            self
496        }
497        /// Set the value of the `height` attribute
498        pub fn height(&mut self, value: i64) -> &mut Self {
499            self.element.set_height(Some(value));
500            self
501        }
502        /// Set the value of the `accesskey` attribute
503        pub fn access_key(
504            &mut self,
505            value: impl Into<std::borrow::Cow<'static, str>>,
506        ) -> &mut Self {
507            self.element.set_access_key(Some(value.into()));
508            self
509        }
510        /// Set the value of the `autocapitalize` attribute
511        pub fn auto_capitalize(
512            &mut self,
513            value: impl Into<std::borrow::Cow<'static, str>>,
514        ) -> &mut Self {
515            self.element.set_auto_capitalize(Some(value.into()));
516            self
517        }
518        /// Set the value of the `autofocus` attribute
519        pub fn autofocus(&mut self, value: bool) -> &mut Self {
520            self.element.set_autofocus(value);
521            self
522        }
523        /// Set the value of the `class` attribute
524        pub fn class(
525            &mut self,
526            value: impl Into<std::borrow::Cow<'static, str>>,
527        ) -> &mut Self {
528            self.element.set_class(Some(value.into()));
529            self
530        }
531        /// Set the value of the `contenteditable` attribute
532        pub fn content_editable(
533            &mut self,
534            value: impl Into<std::borrow::Cow<'static, str>>,
535        ) -> &mut Self {
536            self.element.set_content_editable(Some(value.into()));
537            self
538        }
539        /// Set the value of the `dir` attribute
540        pub fn direction(
541            &mut self,
542            value: impl Into<std::borrow::Cow<'static, str>>,
543        ) -> &mut Self {
544            self.element.set_direction(Some(value.into()));
545            self
546        }
547        /// Set the value of the `draggable` attribute
548        pub fn draggable(&mut self, value: bool) -> &mut Self {
549            self.element.set_draggable(value);
550            self
551        }
552        /// Set the value of the `enterkeyhint` attribute
553        pub fn enter_key_hint(
554            &mut self,
555            value: impl Into<std::borrow::Cow<'static, str>>,
556        ) -> &mut Self {
557            self.element.set_enter_key_hint(Some(value.into()));
558            self
559        }
560        /// Set the value of the `exportparts` attribute
561        pub fn export_parts(
562            &mut self,
563            value: impl Into<std::borrow::Cow<'static, str>>,
564        ) -> &mut Self {
565            self.element.set_export_parts(Some(value.into()));
566            self
567        }
568        /// Set the value of the `hidden` attribute
569        pub fn hidden(
570            &mut self,
571            value: impl Into<std::borrow::Cow<'static, str>>,
572        ) -> &mut Self {
573            self.element.set_hidden(Some(value.into()));
574            self
575        }
576        /// Set the value of the `id` attribute
577        pub fn id(
578            &mut self,
579            value: impl Into<std::borrow::Cow<'static, str>>,
580        ) -> &mut Self {
581            self.element.set_id(Some(value.into()));
582            self
583        }
584        /// Set the value of the `inert` attribute
585        pub fn inert(&mut self, value: bool) -> &mut Self {
586            self.element.set_inert(value);
587            self
588        }
589        /// Set the value of the `inputmode` attribute
590        pub fn input_mode(
591            &mut self,
592            value: impl Into<std::borrow::Cow<'static, str>>,
593        ) -> &mut Self {
594            self.element.set_input_mode(Some(value.into()));
595            self
596        }
597        /// Set the value of the `is` attribute
598        pub fn is_(
599            &mut self,
600            value: impl Into<std::borrow::Cow<'static, str>>,
601        ) -> &mut Self {
602            self.element.set_is_(Some(value.into()));
603            self
604        }
605        /// Set the value of the `itemid` attribute
606        pub fn item_id(
607            &mut self,
608            value: impl Into<std::borrow::Cow<'static, str>>,
609        ) -> &mut Self {
610            self.element.set_item_id(Some(value.into()));
611            self
612        }
613        /// Set the value of the `itemprop` attribute
614        pub fn item_prop(
615            &mut self,
616            value: impl Into<std::borrow::Cow<'static, str>>,
617        ) -> &mut Self {
618            self.element.set_item_prop(Some(value.into()));
619            self
620        }
621        /// Set the value of the `itemref` attribute
622        pub fn item_ref(
623            &mut self,
624            value: impl Into<std::borrow::Cow<'static, str>>,
625        ) -> &mut Self {
626            self.element.set_item_ref(Some(value.into()));
627            self
628        }
629        /// Set the value of the `itemscope` attribute
630        pub fn item_scope(
631            &mut self,
632            value: impl Into<std::borrow::Cow<'static, str>>,
633        ) -> &mut Self {
634            self.element.set_item_scope(Some(value.into()));
635            self
636        }
637        /// Set the value of the `itemtype` attribute
638        pub fn item_type(
639            &mut self,
640            value: impl Into<std::borrow::Cow<'static, str>>,
641        ) -> &mut Self {
642            self.element.set_item_type(Some(value.into()));
643            self
644        }
645        /// Set the value of the `lang` attribute
646        pub fn lang(
647            &mut self,
648            value: impl Into<std::borrow::Cow<'static, str>>,
649        ) -> &mut Self {
650            self.element.set_lang(Some(value.into()));
651            self
652        }
653        /// Set the value of the `nonce` attribute
654        pub fn nonce(
655            &mut self,
656            value: impl Into<std::borrow::Cow<'static, str>>,
657        ) -> &mut Self {
658            self.element.set_nonce(Some(value.into()));
659            self
660        }
661        /// Set the value of the `part` attribute
662        pub fn part(
663            &mut self,
664            value: impl Into<std::borrow::Cow<'static, str>>,
665        ) -> &mut Self {
666            self.element.set_part(Some(value.into()));
667            self
668        }
669        /// Set the value of the `slot` attribute
670        pub fn slot(
671            &mut self,
672            value: impl Into<std::borrow::Cow<'static, str>>,
673        ) -> &mut Self {
674            self.element.set_slot(Some(value.into()));
675            self
676        }
677        /// Set the value of the `spellcheck` attribute
678        pub fn spellcheck(
679            &mut self,
680            value: impl Into<std::borrow::Cow<'static, str>>,
681        ) -> &mut Self {
682            self.element.set_spellcheck(Some(value.into()));
683            self
684        }
685        /// Set the value of the `style` attribute
686        pub fn style(
687            &mut self,
688            value: impl Into<std::borrow::Cow<'static, str>>,
689        ) -> &mut Self {
690            self.element.set_style(Some(value.into()));
691            self
692        }
693        /// Set the value of the `tabindex` attribute
694        pub fn tab_index(&mut self, value: i64) -> &mut Self {
695            self.element.set_tab_index(Some(value));
696            self
697        }
698        /// Set the value of the `title` attribute
699        pub fn title(
700            &mut self,
701            value: impl Into<std::borrow::Cow<'static, str>>,
702        ) -> &mut Self {
703            self.element.set_title(Some(value.into()));
704            self
705        }
706        /// Set the value of the `translate` attribute
707        pub fn translate(&mut self, value: bool) -> &mut Self {
708            self.element.set_translate(value);
709            self
710        }
711    }
712}