html_compose.elements.source_element

  1from typing import Literal, Iterable, Mapping
  2
  3from ..attributes import GlobalAttrs, SourceAttrs
  4from ..base_attribute import BaseAttribute
  5from ..base_element import BaseElement
  6from ..base_types import Resolvable, StrLike
  7
  8# This file is generated by tools/generate_elements.py
  9
 10
 11class source(BaseElement):
 12    """
 13    The 'source' element.  
 14    Description: Image source for img or media source for video or audio  
 15    Categories: none  
 16    Parents: picture video audio  
 17    Children: empty  
 18    Interface: HTMLSourceElement  
 19    Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source  
 20    """  # fmt: skip
 21
 22    tag = "source"
 23    categories = ["none"]
 24
 25    class hint(GlobalAttrs, SourceAttrs):
 26        """
 27        Type hints for "source" attrs  
 28        This class holds functions which return BaseAttributes  
 29        Which you can add to your element attrs  
 30        """  # fmt: skip
 31
 32        pass
 33
 34    _ = hint
 35
 36    def __init__(
 37        self,
 38        attrs: Iterable[BaseAttribute]
 39        | Mapping[str, Resolvable]
 40        | Iterable[
 41            BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable]
 42        ]
 43        | None = None,
 44        id: StrLike | None = None,
 45        class_: Resolvable | None = None,
 46        height: int | StrLike | None = None,
 47        media: StrLike | None = None,
 48        sizes: StrLike | None = None,
 49        src: StrLike | None = None,
 50        srcset: StrLike | None = None,
 51        type: StrLike | None = None,
 52        width: int | StrLike | None = None,
 53        accesskey: Resolvable | StrLike | None = None,
 54        autocapitalize: Literal[
 55            "on", "off", "none", "sentences", "words", "characters"
 56        ]
 57        | StrLike
 58        | None = None,
 59        autocorrect: Literal["on", "off"] | StrLike | None = None,
 60        autofocus: bool | StrLike | None = None,
 61        contenteditable: Literal["true", "plaintext-only", "false"]
 62        | StrLike
 63        | None = None,
 64        dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None,
 65        draggable: Literal["true", "false"] | StrLike | None = None,
 66        enterkeyhint: Literal[
 67            "enter", "done", "go", "next", "previous", "search", "send"
 68        ]
 69        | StrLike
 70        | None = None,
 71        hidden: Literal["until-found", "hidden", ""] | StrLike | None = None,
 72        inert: bool | StrLike | None = None,
 73        inputmode: Literal[
 74            "none",
 75            "text",
 76            "tel",
 77            "email",
 78            "url",
 79            "numeric",
 80            "decimal",
 81            "search",
 82        ]
 83        | StrLike
 84        | None = None,
 85        is_: StrLike | None = None,
 86        itemid: StrLike | None = None,
 87        itemprop: Resolvable | StrLike | None = None,
 88        itemref: Resolvable | StrLike | None = None,
 89        itemscope: bool | StrLike | None = None,
 90        itemtype: Resolvable | StrLike | None = None,
 91        lang: StrLike | None = None,
 92        nonce: StrLike | None = None,
 93        onauxclick: StrLike | None = None,
 94        onbeforeinput: StrLike | None = None,
 95        onbeforematch: StrLike | None = None,
 96        onbeforetoggle: StrLike | None = None,
 97        onblur: StrLike | None = None,
 98        oncancel: StrLike | None = None,
 99        oncanplay: StrLike | None = None,
100        oncanplaythrough: StrLike | None = None,
101        onchange: StrLike | None = None,
102        onclick: StrLike | None = None,
103        onclose: StrLike | None = None,
104        oncontextlost: StrLike | None = None,
105        oncontextmenu: StrLike | None = None,
106        oncontextrestored: StrLike | None = None,
107        oncopy: StrLike | None = None,
108        oncuechange: StrLike | None = None,
109        oncut: StrLike | None = None,
110        ondblclick: StrLike | None = None,
111        ondrag: StrLike | None = None,
112        ondragend: StrLike | None = None,
113        ondragenter: StrLike | None = None,
114        ondragleave: StrLike | None = None,
115        ondragover: StrLike | None = None,
116        ondragstart: StrLike | None = None,
117        ondrop: StrLike | None = None,
118        ondurationchange: StrLike | None = None,
119        onemptied: StrLike | None = None,
120        onended: StrLike | None = None,
121        onerror: StrLike | None = None,
122        onfocus: StrLike | None = None,
123        onformdata: StrLike | None = None,
124        oninput: StrLike | None = None,
125        oninvalid: StrLike | None = None,
126        onkeydown: StrLike | None = None,
127        onkeypress: StrLike | None = None,
128        onkeyup: StrLike | None = None,
129        onload: StrLike | None = None,
130        onloadeddata: StrLike | None = None,
131        onloadedmetadata: StrLike | None = None,
132        onloadstart: StrLike | None = None,
133        onmousedown: StrLike | None = None,
134        onmouseenter: StrLike | None = None,
135        onmouseleave: StrLike | None = None,
136        onmousemove: StrLike | None = None,
137        onmouseout: StrLike | None = None,
138        onmouseover: StrLike | None = None,
139        onmouseup: StrLike | None = None,
140        onpaste: StrLike | None = None,
141        onpause: StrLike | None = None,
142        onplay: StrLike | None = None,
143        onplaying: StrLike | None = None,
144        onprogress: StrLike | None = None,
145        onratechange: StrLike | None = None,
146        onreset: StrLike | None = None,
147        onresize: StrLike | None = None,
148        onscroll: StrLike | None = None,
149        onscrollend: StrLike | None = None,
150        onsecuritypolicyviolation: StrLike | None = None,
151        onseeked: StrLike | None = None,
152        onseeking: StrLike | None = None,
153        onselect: StrLike | None = None,
154        onslotchange: StrLike | None = None,
155        onstalled: StrLike | None = None,
156        onsubmit: StrLike | None = None,
157        onsuspend: StrLike | None = None,
158        ontimeupdate: StrLike | None = None,
159        ontoggle: StrLike | None = None,
160        onvolumechange: StrLike | None = None,
161        onwaiting: StrLike | None = None,
162        onwheel: StrLike | None = None,
163        popover: Literal["auto", "manual"] | StrLike | None = None,
164        slot: StrLike | None = None,
165        spellcheck: Literal["true", "false", ""] | StrLike | None = None,
166        style: Resolvable | Mapping[StrLike, StrLike] | None = None,
167        tabindex: int | StrLike | None = None,
168        title: StrLike | None = None,
169        translate: Literal["yes", "no"] | StrLike | None = None,
170        writingsuggestions: Literal["true", "false", ""]
171        | StrLike
172        | None = None,
173        children: list | None = None,
174    ) -> None:
175        """
176        Initialize 'source' (Image source for img or media source for video or audio) element.  
177        Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source
178
179        Args:
180            attrs: 
181                A list or dictionary of attributes for the element
182            
183            id:
184                The element's ID
185            
186            class_:
187                Classes to which the element belongs
188            
189            height:
190                Vertical dimension
191            
192            media:
193                Applicable media.  
194                Value hint: Valid media query list
195            
196            sizes:
197                Image sizes for different page layouts.  
198                Value hint: Valid source size list
199            
200            src:
201                Address of the resource.  
202                Value hint: Valid non-empty URL potentially surrounded by spaces
203            
204            srcset:
205                Images to use in different situations, e.g., high-resolution displays, small monitors, etc..  
206                Value hint: Comma-separated list of image candidate strings
207            
208            type:
209                Type of embedded resource.  
210                Value hint: Valid MIME type string
211            
212            width:
213                Horizontal dimension
214            
215            accesskey:
216                Keyboard shortcut to activate or focus element
217            
218            autocapitalize:
219                Recommended autocapitalization behavior (for supported input methods)
220            
221            autocorrect:
222                Recommended autocorrection behavior (for supported input methods)
223            
224            autofocus:
225                Automatically focus the element when the page is loaded
226            
227            contenteditable:
228                Whether the element is editable
229            
230            dir:
231                The text directionality of the element
232            
233            draggable:
234                Whether the element is draggable
235            
236            enterkeyhint:
237                Hint for selecting an enter key action
238            
239            hidden:
240                Whether the element is relevant
241            
242            inert:
243                Whether the element is inert.
244            
245            inputmode:
246                Hint for selecting an input modality
247            
248            is_:
249                Creates a customized built-in element.  
250                Value hint: Valid custom element name of a defined customized built-in element
251            
252            itemid:
253                Global identifier for a microdata item.  
254                Value hint: Valid URL potentially surrounded by spaces
255            
256            itemprop:
257                Property names of a microdata item
258            
259            itemref:
260                Referenced elements
261            
262            itemscope:
263                Introduces a microdata item
264            
265            itemtype:
266                Item types of a microdata item
267            
268            lang:
269                Language of the element.  
270                Value hint: Valid BCP 47 language tag or the empty string
271            
272            nonce:
273                Cryptographic nonce used in Content Security Policy checks [CSP]
274            
275            onauxclick:
276                auxclick event handler.  
277                Value hint: Event handler content attribute
278            
279            onbeforeinput:
280                beforeinput event handler.  
281                Value hint: Event handler content attribute
282            
283            onbeforematch:
284                beforematch event handler.  
285                Value hint: Event handler content attribute
286            
287            onbeforetoggle:
288                beforetoggle event handler.  
289                Value hint: Event handler content attribute
290            
291            onblur:
292                blur event handler.  
293                Value hint: Event handler content attribute
294            
295            oncancel:
296                cancel event handler.  
297                Value hint: Event handler content attribute
298            
299            oncanplay:
300                canplay event handler.  
301                Value hint: Event handler content attribute
302            
303            oncanplaythrough:
304                canplaythrough event handler.  
305                Value hint: Event handler content attribute
306            
307            onchange:
308                change event handler.  
309                Value hint: Event handler content attribute
310            
311            onclick:
312                click event handler.  
313                Value hint: Event handler content attribute
314            
315            onclose:
316                close event handler.  
317                Value hint: Event handler content attribute
318            
319            oncontextlost:
320                contextlost event handler.  
321                Value hint: Event handler content attribute
322            
323            oncontextmenu:
324                contextmenu event handler.  
325                Value hint: Event handler content attribute
326            
327            oncontextrestored:
328                contextrestored event handler.  
329                Value hint: Event handler content attribute
330            
331            oncopy:
332                copy event handler.  
333                Value hint: Event handler content attribute
334            
335            oncuechange:
336                cuechange event handler.  
337                Value hint: Event handler content attribute
338            
339            oncut:
340                cut event handler.  
341                Value hint: Event handler content attribute
342            
343            ondblclick:
344                dblclick event handler.  
345                Value hint: Event handler content attribute
346            
347            ondrag:
348                drag event handler.  
349                Value hint: Event handler content attribute
350            
351            ondragend:
352                dragend event handler.  
353                Value hint: Event handler content attribute
354            
355            ondragenter:
356                dragenter event handler.  
357                Value hint: Event handler content attribute
358            
359            ondragleave:
360                dragleave event handler.  
361                Value hint: Event handler content attribute
362            
363            ondragover:
364                dragover event handler.  
365                Value hint: Event handler content attribute
366            
367            ondragstart:
368                dragstart event handler.  
369                Value hint: Event handler content attribute
370            
371            ondrop:
372                drop event handler.  
373                Value hint: Event handler content attribute
374            
375            ondurationchange:
376                durationchange event handler.  
377                Value hint: Event handler content attribute
378            
379            onemptied:
380                emptied event handler.  
381                Value hint: Event handler content attribute
382            
383            onended:
384                ended event handler.  
385                Value hint: Event handler content attribute
386            
387            onerror:
388                error event handler.  
389                Value hint: Event handler content attribute
390            
391            onfocus:
392                focus event handler.  
393                Value hint: Event handler content attribute
394            
395            onformdata:
396                formdata event handler.  
397                Value hint: Event handler content attribute
398            
399            oninput:
400                input event handler.  
401                Value hint: Event handler content attribute
402            
403            oninvalid:
404                invalid event handler.  
405                Value hint: Event handler content attribute
406            
407            onkeydown:
408                keydown event handler.  
409                Value hint: Event handler content attribute
410            
411            onkeypress:
412                keypress event handler.  
413                Value hint: Event handler content attribute
414            
415            onkeyup:
416                keyup event handler.  
417                Value hint: Event handler content attribute
418            
419            onload:
420                load event handler.  
421                Value hint: Event handler content attribute
422            
423            onloadeddata:
424                loadeddata event handler.  
425                Value hint: Event handler content attribute
426            
427            onloadedmetadata:
428                loadedmetadata event handler.  
429                Value hint: Event handler content attribute
430            
431            onloadstart:
432                loadstart event handler.  
433                Value hint: Event handler content attribute
434            
435            onmousedown:
436                mousedown event handler.  
437                Value hint: Event handler content attribute
438            
439            onmouseenter:
440                mouseenter event handler.  
441                Value hint: Event handler content attribute
442            
443            onmouseleave:
444                mouseleave event handler.  
445                Value hint: Event handler content attribute
446            
447            onmousemove:
448                mousemove event handler.  
449                Value hint: Event handler content attribute
450            
451            onmouseout:
452                mouseout event handler.  
453                Value hint: Event handler content attribute
454            
455            onmouseover:
456                mouseover event handler.  
457                Value hint: Event handler content attribute
458            
459            onmouseup:
460                mouseup event handler.  
461                Value hint: Event handler content attribute
462            
463            onpaste:
464                paste event handler.  
465                Value hint: Event handler content attribute
466            
467            onpause:
468                pause event handler.  
469                Value hint: Event handler content attribute
470            
471            onplay:
472                play event handler.  
473                Value hint: Event handler content attribute
474            
475            onplaying:
476                playing event handler.  
477                Value hint: Event handler content attribute
478            
479            onprogress:
480                progress event handler.  
481                Value hint: Event handler content attribute
482            
483            onratechange:
484                ratechange event handler.  
485                Value hint: Event handler content attribute
486            
487            onreset:
488                reset event handler.  
489                Value hint: Event handler content attribute
490            
491            onresize:
492                resize event handler.  
493                Value hint: Event handler content attribute
494            
495            onscroll:
496                scroll event handler.  
497                Value hint: Event handler content attribute
498            
499            onscrollend:
500                scrollend event handler.  
501                Value hint: Event handler content attribute
502            
503            onsecuritypolicyviolation:
504                securitypolicyviolation event handler.  
505                Value hint: Event handler content attribute
506            
507            onseeked:
508                seeked event handler.  
509                Value hint: Event handler content attribute
510            
511            onseeking:
512                seeking event handler.  
513                Value hint: Event handler content attribute
514            
515            onselect:
516                select event handler.  
517                Value hint: Event handler content attribute
518            
519            onslotchange:
520                slotchange event handler.  
521                Value hint: Event handler content attribute
522            
523            onstalled:
524                stalled event handler.  
525                Value hint: Event handler content attribute
526            
527            onsubmit:
528                submit event handler.  
529                Value hint: Event handler content attribute
530            
531            onsuspend:
532                suspend event handler.  
533                Value hint: Event handler content attribute
534            
535            ontimeupdate:
536                timeupdate event handler.  
537                Value hint: Event handler content attribute
538            
539            ontoggle:
540                toggle event handler.  
541                Value hint: Event handler content attribute
542            
543            onvolumechange:
544                volumechange event handler.  
545                Value hint: Event handler content attribute
546            
547            onwaiting:
548                waiting event handler.  
549                Value hint: Event handler content attribute
550            
551            onwheel:
552                wheel event handler.  
553                Value hint: Event handler content attribute
554            
555            popover:
556                Makes the element a popover element
557            
558            slot:
559                The element's desired slot
560            
561            spellcheck:
562                Whether the element is to have its spelling and grammar checked
563            
564            style:
565                Presentational and formatting instructions.  
566                Value hint: CSS declarations*
567            
568            tabindex:
569                Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation
570            
571            title:
572                Advisory information for the element
573            
574            translate:
575                Whether the element is to be translated when the page is localized
576            
577            writingsuggestions:
578                Whether the element can offer writing suggestions or not.
579            
580        """  # fmt: skip
581        super().__init__(
582            "source", void_element=True, attrs=attrs, children=children
583        )
584        if not (id is None or id is False):
585            self._process_attr("id", id)
586        if not (class_ is None or class_ is False):
587            self._process_attr("class", class_)
588        if not (height is None or height is False):
589            self._process_attr("height", height)
590        if not (media is None or media is False):
591            self._process_attr("media", media)
592        if not (sizes is None or sizes is False):
593            self._process_attr("sizes", sizes)
594        if not (src is None or src is False):
595            self._process_attr("src", src)
596        if not (srcset is None or srcset is False):
597            self._process_attr("srcset", srcset)
598        if not (type is None or type is False):
599            self._process_attr("type", type)
600        if not (width is None or width is False):
601            self._process_attr("width", width)
602        if not (accesskey is None or accesskey is False):
603            self._process_attr("accesskey", accesskey)
604        if not (autocapitalize is None or autocapitalize is False):
605            self._process_attr("autocapitalize", autocapitalize)
606        if not (autocorrect is None or autocorrect is False):
607            self._process_attr("autocorrect", autocorrect)
608        if not (autofocus is None or autofocus is False):
609            self._process_attr("autofocus", autofocus)
610        if not (contenteditable is None or contenteditable is False):
611            self._process_attr("contenteditable", contenteditable)
612        if not (dir is None or dir is False):
613            self._process_attr("dir", dir)
614        if not (draggable is None or draggable is False):
615            self._process_attr("draggable", draggable)
616        if not (enterkeyhint is None or enterkeyhint is False):
617            self._process_attr("enterkeyhint", enterkeyhint)
618        if not (hidden is None or hidden is False):
619            self._process_attr("hidden", hidden)
620        if not (inert is None or inert is False):
621            self._process_attr("inert", inert)
622        if not (inputmode is None or inputmode is False):
623            self._process_attr("inputmode", inputmode)
624        if not (is_ is None or is_ is False):
625            self._process_attr("is", is_)
626        if not (itemid is None or itemid is False):
627            self._process_attr("itemid", itemid)
628        if not (itemprop is None or itemprop is False):
629            self._process_attr("itemprop", itemprop)
630        if not (itemref is None or itemref is False):
631            self._process_attr("itemref", itemref)
632        if not (itemscope is None or itemscope is False):
633            self._process_attr("itemscope", itemscope)
634        if not (itemtype is None or itemtype is False):
635            self._process_attr("itemtype", itemtype)
636        if not (lang is None or lang is False):
637            self._process_attr("lang", lang)
638        if not (nonce is None or nonce is False):
639            self._process_attr("nonce", nonce)
640        if not (onauxclick is None or onauxclick is False):
641            self._process_attr("onauxclick", onauxclick)
642        if not (onbeforeinput is None or onbeforeinput is False):
643            self._process_attr("onbeforeinput", onbeforeinput)
644        if not (onbeforematch is None or onbeforematch is False):
645            self._process_attr("onbeforematch", onbeforematch)
646        if not (onbeforetoggle is None or onbeforetoggle is False):
647            self._process_attr("onbeforetoggle", onbeforetoggle)
648        if not (onblur is None or onblur is False):
649            self._process_attr("onblur", onblur)
650        if not (oncancel is None or oncancel is False):
651            self._process_attr("oncancel", oncancel)
652        if not (oncanplay is None or oncanplay is False):
653            self._process_attr("oncanplay", oncanplay)
654        if not (oncanplaythrough is None or oncanplaythrough is False):
655            self._process_attr("oncanplaythrough", oncanplaythrough)
656        if not (onchange is None or onchange is False):
657            self._process_attr("onchange", onchange)
658        if not (onclick is None or onclick is False):
659            self._process_attr("onclick", onclick)
660        if not (onclose is None or onclose is False):
661            self._process_attr("onclose", onclose)
662        if not (oncontextlost is None or oncontextlost is False):
663            self._process_attr("oncontextlost", oncontextlost)
664        if not (oncontextmenu is None or oncontextmenu is False):
665            self._process_attr("oncontextmenu", oncontextmenu)
666        if not (oncontextrestored is None or oncontextrestored is False):
667            self._process_attr("oncontextrestored", oncontextrestored)
668        if not (oncopy is None or oncopy is False):
669            self._process_attr("oncopy", oncopy)
670        if not (oncuechange is None or oncuechange is False):
671            self._process_attr("oncuechange", oncuechange)
672        if not (oncut is None or oncut is False):
673            self._process_attr("oncut", oncut)
674        if not (ondblclick is None or ondblclick is False):
675            self._process_attr("ondblclick", ondblclick)
676        if not (ondrag is None or ondrag is False):
677            self._process_attr("ondrag", ondrag)
678        if not (ondragend is None or ondragend is False):
679            self._process_attr("ondragend", ondragend)
680        if not (ondragenter is None or ondragenter is False):
681            self._process_attr("ondragenter", ondragenter)
682        if not (ondragleave is None or ondragleave is False):
683            self._process_attr("ondragleave", ondragleave)
684        if not (ondragover is None or ondragover is False):
685            self._process_attr("ondragover", ondragover)
686        if not (ondragstart is None or ondragstart is False):
687            self._process_attr("ondragstart", ondragstart)
688        if not (ondrop is None or ondrop is False):
689            self._process_attr("ondrop", ondrop)
690        if not (ondurationchange is None or ondurationchange is False):
691            self._process_attr("ondurationchange", ondurationchange)
692        if not (onemptied is None or onemptied is False):
693            self._process_attr("onemptied", onemptied)
694        if not (onended is None or onended is False):
695            self._process_attr("onended", onended)
696        if not (onerror is None or onerror is False):
697            self._process_attr("onerror", onerror)
698        if not (onfocus is None or onfocus is False):
699            self._process_attr("onfocus", onfocus)
700        if not (onformdata is None or onformdata is False):
701            self._process_attr("onformdata", onformdata)
702        if not (oninput is None or oninput is False):
703            self._process_attr("oninput", oninput)
704        if not (oninvalid is None or oninvalid is False):
705            self._process_attr("oninvalid", oninvalid)
706        if not (onkeydown is None or onkeydown is False):
707            self._process_attr("onkeydown", onkeydown)
708        if not (onkeypress is None or onkeypress is False):
709            self._process_attr("onkeypress", onkeypress)
710        if not (onkeyup is None or onkeyup is False):
711            self._process_attr("onkeyup", onkeyup)
712        if not (onload is None or onload is False):
713            self._process_attr("onload", onload)
714        if not (onloadeddata is None or onloadeddata is False):
715            self._process_attr("onloadeddata", onloadeddata)
716        if not (onloadedmetadata is None or onloadedmetadata is False):
717            self._process_attr("onloadedmetadata", onloadedmetadata)
718        if not (onloadstart is None or onloadstart is False):
719            self._process_attr("onloadstart", onloadstart)
720        if not (onmousedown is None or onmousedown is False):
721            self._process_attr("onmousedown", onmousedown)
722        if not (onmouseenter is None or onmouseenter is False):
723            self._process_attr("onmouseenter", onmouseenter)
724        if not (onmouseleave is None or onmouseleave is False):
725            self._process_attr("onmouseleave", onmouseleave)
726        if not (onmousemove is None or onmousemove is False):
727            self._process_attr("onmousemove", onmousemove)
728        if not (onmouseout is None or onmouseout is False):
729            self._process_attr("onmouseout", onmouseout)
730        if not (onmouseover is None or onmouseover is False):
731            self._process_attr("onmouseover", onmouseover)
732        if not (onmouseup is None or onmouseup is False):
733            self._process_attr("onmouseup", onmouseup)
734        if not (onpaste is None or onpaste is False):
735            self._process_attr("onpaste", onpaste)
736        if not (onpause is None or onpause is False):
737            self._process_attr("onpause", onpause)
738        if not (onplay is None or onplay is False):
739            self._process_attr("onplay", onplay)
740        if not (onplaying is None or onplaying is False):
741            self._process_attr("onplaying", onplaying)
742        if not (onprogress is None or onprogress is False):
743            self._process_attr("onprogress", onprogress)
744        if not (onratechange is None or onratechange is False):
745            self._process_attr("onratechange", onratechange)
746        if not (onreset is None or onreset is False):
747            self._process_attr("onreset", onreset)
748        if not (onresize is None or onresize is False):
749            self._process_attr("onresize", onresize)
750        if not (onscroll is None or onscroll is False):
751            self._process_attr("onscroll", onscroll)
752        if not (onscrollend is None or onscrollend is False):
753            self._process_attr("onscrollend", onscrollend)
754        if not (
755            onsecuritypolicyviolation is None
756            or onsecuritypolicyviolation is False
757        ):
758            self._process_attr(
759                "onsecuritypolicyviolation", onsecuritypolicyviolation
760            )
761        if not (onseeked is None or onseeked is False):
762            self._process_attr("onseeked", onseeked)
763        if not (onseeking is None or onseeking is False):
764            self._process_attr("onseeking", onseeking)
765        if not (onselect is None or onselect is False):
766            self._process_attr("onselect", onselect)
767        if not (onslotchange is None or onslotchange is False):
768            self._process_attr("onslotchange", onslotchange)
769        if not (onstalled is None or onstalled is False):
770            self._process_attr("onstalled", onstalled)
771        if not (onsubmit is None or onsubmit is False):
772            self._process_attr("onsubmit", onsubmit)
773        if not (onsuspend is None or onsuspend is False):
774            self._process_attr("onsuspend", onsuspend)
775        if not (ontimeupdate is None or ontimeupdate is False):
776            self._process_attr("ontimeupdate", ontimeupdate)
777        if not (ontoggle is None or ontoggle is False):
778            self._process_attr("ontoggle", ontoggle)
779        if not (onvolumechange is None or onvolumechange is False):
780            self._process_attr("onvolumechange", onvolumechange)
781        if not (onwaiting is None or onwaiting is False):
782            self._process_attr("onwaiting", onwaiting)
783        if not (onwheel is None or onwheel is False):
784            self._process_attr("onwheel", onwheel)
785        if not (popover is None or popover is False):
786            self._process_attr("popover", popover)
787        if not (slot is None or slot is False):
788            self._process_attr("slot", slot)
789        if not (spellcheck is None or spellcheck is False):
790            self._process_attr("spellcheck", spellcheck)
791        if not (style is None or style is False):
792            self._process_attr("style", style)
793        if not (tabindex is None or tabindex is False):
794            self._process_attr("tabindex", tabindex)
795        if not (title is None or title is False):
796            self._process_attr("title", title)
797        if not (translate is None or translate is False):
798            self._process_attr("translate", translate)
799        if not (writingsuggestions is None or writingsuggestions is False):
800            self._process_attr("writingsuggestions", writingsuggestions)
class source(html_compose.base_element.BaseElement):
 12class source(BaseElement):
 13    """
 14    The 'source' element.  
 15    Description: Image source for img or media source for video or audio  
 16    Categories: none  
 17    Parents: picture video audio  
 18    Children: empty  
 19    Interface: HTMLSourceElement  
 20    Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source  
 21    """  # fmt: skip
 22
 23    tag = "source"
 24    categories = ["none"]
 25
 26    class hint(GlobalAttrs, SourceAttrs):
 27        """
 28        Type hints for "source" attrs  
 29        This class holds functions which return BaseAttributes  
 30        Which you can add to your element attrs  
 31        """  # fmt: skip
 32
 33        pass
 34
 35    _ = hint
 36
 37    def __init__(
 38        self,
 39        attrs: Iterable[BaseAttribute]
 40        | Mapping[str, Resolvable]
 41        | Iterable[
 42            BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable]
 43        ]
 44        | None = None,
 45        id: StrLike | None = None,
 46        class_: Resolvable | None = None,
 47        height: int | StrLike | None = None,
 48        media: StrLike | None = None,
 49        sizes: StrLike | None = None,
 50        src: StrLike | None = None,
 51        srcset: StrLike | None = None,
 52        type: StrLike | None = None,
 53        width: int | StrLike | None = None,
 54        accesskey: Resolvable | StrLike | None = None,
 55        autocapitalize: Literal[
 56            "on", "off", "none", "sentences", "words", "characters"
 57        ]
 58        | StrLike
 59        | None = None,
 60        autocorrect: Literal["on", "off"] | StrLike | None = None,
 61        autofocus: bool | StrLike | None = None,
 62        contenteditable: Literal["true", "plaintext-only", "false"]
 63        | StrLike
 64        | None = None,
 65        dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None,
 66        draggable: Literal["true", "false"] | StrLike | None = None,
 67        enterkeyhint: Literal[
 68            "enter", "done", "go", "next", "previous", "search", "send"
 69        ]
 70        | StrLike
 71        | None = None,
 72        hidden: Literal["until-found", "hidden", ""] | StrLike | None = None,
 73        inert: bool | StrLike | None = None,
 74        inputmode: Literal[
 75            "none",
 76            "text",
 77            "tel",
 78            "email",
 79            "url",
 80            "numeric",
 81            "decimal",
 82            "search",
 83        ]
 84        | StrLike
 85        | None = None,
 86        is_: StrLike | None = None,
 87        itemid: StrLike | None = None,
 88        itemprop: Resolvable | StrLike | None = None,
 89        itemref: Resolvable | StrLike | None = None,
 90        itemscope: bool | StrLike | None = None,
 91        itemtype: Resolvable | StrLike | None = None,
 92        lang: StrLike | None = None,
 93        nonce: StrLike | None = None,
 94        onauxclick: StrLike | None = None,
 95        onbeforeinput: StrLike | None = None,
 96        onbeforematch: StrLike | None = None,
 97        onbeforetoggle: StrLike | None = None,
 98        onblur: StrLike | None = None,
 99        oncancel: StrLike | None = None,
100        oncanplay: StrLike | None = None,
101        oncanplaythrough: StrLike | None = None,
102        onchange: StrLike | None = None,
103        onclick: StrLike | None = None,
104        onclose: StrLike | None = None,
105        oncontextlost: StrLike | None = None,
106        oncontextmenu: StrLike | None = None,
107        oncontextrestored: StrLike | None = None,
108        oncopy: StrLike | None = None,
109        oncuechange: StrLike | None = None,
110        oncut: StrLike | None = None,
111        ondblclick: StrLike | None = None,
112        ondrag: StrLike | None = None,
113        ondragend: StrLike | None = None,
114        ondragenter: StrLike | None = None,
115        ondragleave: StrLike | None = None,
116        ondragover: StrLike | None = None,
117        ondragstart: StrLike | None = None,
118        ondrop: StrLike | None = None,
119        ondurationchange: StrLike | None = None,
120        onemptied: StrLike | None = None,
121        onended: StrLike | None = None,
122        onerror: StrLike | None = None,
123        onfocus: StrLike | None = None,
124        onformdata: StrLike | None = None,
125        oninput: StrLike | None = None,
126        oninvalid: StrLike | None = None,
127        onkeydown: StrLike | None = None,
128        onkeypress: StrLike | None = None,
129        onkeyup: StrLike | None = None,
130        onload: StrLike | None = None,
131        onloadeddata: StrLike | None = None,
132        onloadedmetadata: StrLike | None = None,
133        onloadstart: StrLike | None = None,
134        onmousedown: StrLike | None = None,
135        onmouseenter: StrLike | None = None,
136        onmouseleave: StrLike | None = None,
137        onmousemove: StrLike | None = None,
138        onmouseout: StrLike | None = None,
139        onmouseover: StrLike | None = None,
140        onmouseup: StrLike | None = None,
141        onpaste: StrLike | None = None,
142        onpause: StrLike | None = None,
143        onplay: StrLike | None = None,
144        onplaying: StrLike | None = None,
145        onprogress: StrLike | None = None,
146        onratechange: StrLike | None = None,
147        onreset: StrLike | None = None,
148        onresize: StrLike | None = None,
149        onscroll: StrLike | None = None,
150        onscrollend: StrLike | None = None,
151        onsecuritypolicyviolation: StrLike | None = None,
152        onseeked: StrLike | None = None,
153        onseeking: StrLike | None = None,
154        onselect: StrLike | None = None,
155        onslotchange: StrLike | None = None,
156        onstalled: StrLike | None = None,
157        onsubmit: StrLike | None = None,
158        onsuspend: StrLike | None = None,
159        ontimeupdate: StrLike | None = None,
160        ontoggle: StrLike | None = None,
161        onvolumechange: StrLike | None = None,
162        onwaiting: StrLike | None = None,
163        onwheel: StrLike | None = None,
164        popover: Literal["auto", "manual"] | StrLike | None = None,
165        slot: StrLike | None = None,
166        spellcheck: Literal["true", "false", ""] | StrLike | None = None,
167        style: Resolvable | Mapping[StrLike, StrLike] | None = None,
168        tabindex: int | StrLike | None = None,
169        title: StrLike | None = None,
170        translate: Literal["yes", "no"] | StrLike | None = None,
171        writingsuggestions: Literal["true", "false", ""]
172        | StrLike
173        | None = None,
174        children: list | None = None,
175    ) -> None:
176        """
177        Initialize 'source' (Image source for img or media source for video or audio) element.  
178        Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source
179
180        Args:
181            attrs: 
182                A list or dictionary of attributes for the element
183            
184            id:
185                The element's ID
186            
187            class_:
188                Classes to which the element belongs
189            
190            height:
191                Vertical dimension
192            
193            media:
194                Applicable media.  
195                Value hint: Valid media query list
196            
197            sizes:
198                Image sizes for different page layouts.  
199                Value hint: Valid source size list
200            
201            src:
202                Address of the resource.  
203                Value hint: Valid non-empty URL potentially surrounded by spaces
204            
205            srcset:
206                Images to use in different situations, e.g., high-resolution displays, small monitors, etc..  
207                Value hint: Comma-separated list of image candidate strings
208            
209            type:
210                Type of embedded resource.  
211                Value hint: Valid MIME type string
212            
213            width:
214                Horizontal dimension
215            
216            accesskey:
217                Keyboard shortcut to activate or focus element
218            
219            autocapitalize:
220                Recommended autocapitalization behavior (for supported input methods)
221            
222            autocorrect:
223                Recommended autocorrection behavior (for supported input methods)
224            
225            autofocus:
226                Automatically focus the element when the page is loaded
227            
228            contenteditable:
229                Whether the element is editable
230            
231            dir:
232                The text directionality of the element
233            
234            draggable:
235                Whether the element is draggable
236            
237            enterkeyhint:
238                Hint for selecting an enter key action
239            
240            hidden:
241                Whether the element is relevant
242            
243            inert:
244                Whether the element is inert.
245            
246            inputmode:
247                Hint for selecting an input modality
248            
249            is_:
250                Creates a customized built-in element.  
251                Value hint: Valid custom element name of a defined customized built-in element
252            
253            itemid:
254                Global identifier for a microdata item.  
255                Value hint: Valid URL potentially surrounded by spaces
256            
257            itemprop:
258                Property names of a microdata item
259            
260            itemref:
261                Referenced elements
262            
263            itemscope:
264                Introduces a microdata item
265            
266            itemtype:
267                Item types of a microdata item
268            
269            lang:
270                Language of the element.  
271                Value hint: Valid BCP 47 language tag or the empty string
272            
273            nonce:
274                Cryptographic nonce used in Content Security Policy checks [CSP]
275            
276            onauxclick:
277                auxclick event handler.  
278                Value hint: Event handler content attribute
279            
280            onbeforeinput:
281                beforeinput event handler.  
282                Value hint: Event handler content attribute
283            
284            onbeforematch:
285                beforematch event handler.  
286                Value hint: Event handler content attribute
287            
288            onbeforetoggle:
289                beforetoggle event handler.  
290                Value hint: Event handler content attribute
291            
292            onblur:
293                blur event handler.  
294                Value hint: Event handler content attribute
295            
296            oncancel:
297                cancel event handler.  
298                Value hint: Event handler content attribute
299            
300            oncanplay:
301                canplay event handler.  
302                Value hint: Event handler content attribute
303            
304            oncanplaythrough:
305                canplaythrough event handler.  
306                Value hint: Event handler content attribute
307            
308            onchange:
309                change event handler.  
310                Value hint: Event handler content attribute
311            
312            onclick:
313                click event handler.  
314                Value hint: Event handler content attribute
315            
316            onclose:
317                close event handler.  
318                Value hint: Event handler content attribute
319            
320            oncontextlost:
321                contextlost event handler.  
322                Value hint: Event handler content attribute
323            
324            oncontextmenu:
325                contextmenu event handler.  
326                Value hint: Event handler content attribute
327            
328            oncontextrestored:
329                contextrestored event handler.  
330                Value hint: Event handler content attribute
331            
332            oncopy:
333                copy event handler.  
334                Value hint: Event handler content attribute
335            
336            oncuechange:
337                cuechange event handler.  
338                Value hint: Event handler content attribute
339            
340            oncut:
341                cut event handler.  
342                Value hint: Event handler content attribute
343            
344            ondblclick:
345                dblclick event handler.  
346                Value hint: Event handler content attribute
347            
348            ondrag:
349                drag event handler.  
350                Value hint: Event handler content attribute
351            
352            ondragend:
353                dragend event handler.  
354                Value hint: Event handler content attribute
355            
356            ondragenter:
357                dragenter event handler.  
358                Value hint: Event handler content attribute
359            
360            ondragleave:
361                dragleave event handler.  
362                Value hint: Event handler content attribute
363            
364            ondragover:
365                dragover event handler.  
366                Value hint: Event handler content attribute
367            
368            ondragstart:
369                dragstart event handler.  
370                Value hint: Event handler content attribute
371            
372            ondrop:
373                drop event handler.  
374                Value hint: Event handler content attribute
375            
376            ondurationchange:
377                durationchange event handler.  
378                Value hint: Event handler content attribute
379            
380            onemptied:
381                emptied event handler.  
382                Value hint: Event handler content attribute
383            
384            onended:
385                ended event handler.  
386                Value hint: Event handler content attribute
387            
388            onerror:
389                error event handler.  
390                Value hint: Event handler content attribute
391            
392            onfocus:
393                focus event handler.  
394                Value hint: Event handler content attribute
395            
396            onformdata:
397                formdata event handler.  
398                Value hint: Event handler content attribute
399            
400            oninput:
401                input event handler.  
402                Value hint: Event handler content attribute
403            
404            oninvalid:
405                invalid event handler.  
406                Value hint: Event handler content attribute
407            
408            onkeydown:
409                keydown event handler.  
410                Value hint: Event handler content attribute
411            
412            onkeypress:
413                keypress event handler.  
414                Value hint: Event handler content attribute
415            
416            onkeyup:
417                keyup event handler.  
418                Value hint: Event handler content attribute
419            
420            onload:
421                load event handler.  
422                Value hint: Event handler content attribute
423            
424            onloadeddata:
425                loadeddata event handler.  
426                Value hint: Event handler content attribute
427            
428            onloadedmetadata:
429                loadedmetadata event handler.  
430                Value hint: Event handler content attribute
431            
432            onloadstart:
433                loadstart event handler.  
434                Value hint: Event handler content attribute
435            
436            onmousedown:
437                mousedown event handler.  
438                Value hint: Event handler content attribute
439            
440            onmouseenter:
441                mouseenter event handler.  
442                Value hint: Event handler content attribute
443            
444            onmouseleave:
445                mouseleave event handler.  
446                Value hint: Event handler content attribute
447            
448            onmousemove:
449                mousemove event handler.  
450                Value hint: Event handler content attribute
451            
452            onmouseout:
453                mouseout event handler.  
454                Value hint: Event handler content attribute
455            
456            onmouseover:
457                mouseover event handler.  
458                Value hint: Event handler content attribute
459            
460            onmouseup:
461                mouseup event handler.  
462                Value hint: Event handler content attribute
463            
464            onpaste:
465                paste event handler.  
466                Value hint: Event handler content attribute
467            
468            onpause:
469                pause event handler.  
470                Value hint: Event handler content attribute
471            
472            onplay:
473                play event handler.  
474                Value hint: Event handler content attribute
475            
476            onplaying:
477                playing event handler.  
478                Value hint: Event handler content attribute
479            
480            onprogress:
481                progress event handler.  
482                Value hint: Event handler content attribute
483            
484            onratechange:
485                ratechange event handler.  
486                Value hint: Event handler content attribute
487            
488            onreset:
489                reset event handler.  
490                Value hint: Event handler content attribute
491            
492            onresize:
493                resize event handler.  
494                Value hint: Event handler content attribute
495            
496            onscroll:
497                scroll event handler.  
498                Value hint: Event handler content attribute
499            
500            onscrollend:
501                scrollend event handler.  
502                Value hint: Event handler content attribute
503            
504            onsecuritypolicyviolation:
505                securitypolicyviolation event handler.  
506                Value hint: Event handler content attribute
507            
508            onseeked:
509                seeked event handler.  
510                Value hint: Event handler content attribute
511            
512            onseeking:
513                seeking event handler.  
514                Value hint: Event handler content attribute
515            
516            onselect:
517                select event handler.  
518                Value hint: Event handler content attribute
519            
520            onslotchange:
521                slotchange event handler.  
522                Value hint: Event handler content attribute
523            
524            onstalled:
525                stalled event handler.  
526                Value hint: Event handler content attribute
527            
528            onsubmit:
529                submit event handler.  
530                Value hint: Event handler content attribute
531            
532            onsuspend:
533                suspend event handler.  
534                Value hint: Event handler content attribute
535            
536            ontimeupdate:
537                timeupdate event handler.  
538                Value hint: Event handler content attribute
539            
540            ontoggle:
541                toggle event handler.  
542                Value hint: Event handler content attribute
543            
544            onvolumechange:
545                volumechange event handler.  
546                Value hint: Event handler content attribute
547            
548            onwaiting:
549                waiting event handler.  
550                Value hint: Event handler content attribute
551            
552            onwheel:
553                wheel event handler.  
554                Value hint: Event handler content attribute
555            
556            popover:
557                Makes the element a popover element
558            
559            slot:
560                The element's desired slot
561            
562            spellcheck:
563                Whether the element is to have its spelling and grammar checked
564            
565            style:
566                Presentational and formatting instructions.  
567                Value hint: CSS declarations*
568            
569            tabindex:
570                Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation
571            
572            title:
573                Advisory information for the element
574            
575            translate:
576                Whether the element is to be translated when the page is localized
577            
578            writingsuggestions:
579                Whether the element can offer writing suggestions or not.
580            
581        """  # fmt: skip
582        super().__init__(
583            "source", void_element=True, attrs=attrs, children=children
584        )
585        if not (id is None or id is False):
586            self._process_attr("id", id)
587        if not (class_ is None or class_ is False):
588            self._process_attr("class", class_)
589        if not (height is None or height is False):
590            self._process_attr("height", height)
591        if not (media is None or media is False):
592            self._process_attr("media", media)
593        if not (sizes is None or sizes is False):
594            self._process_attr("sizes", sizes)
595        if not (src is None or src is False):
596            self._process_attr("src", src)
597        if not (srcset is None or srcset is False):
598            self._process_attr("srcset", srcset)
599        if not (type is None or type is False):
600            self._process_attr("type", type)
601        if not (width is None or width is False):
602            self._process_attr("width", width)
603        if not (accesskey is None or accesskey is False):
604            self._process_attr("accesskey", accesskey)
605        if not (autocapitalize is None or autocapitalize is False):
606            self._process_attr("autocapitalize", autocapitalize)
607        if not (autocorrect is None or autocorrect is False):
608            self._process_attr("autocorrect", autocorrect)
609        if not (autofocus is None or autofocus is False):
610            self._process_attr("autofocus", autofocus)
611        if not (contenteditable is None or contenteditable is False):
612            self._process_attr("contenteditable", contenteditable)
613        if not (dir is None or dir is False):
614            self._process_attr("dir", dir)
615        if not (draggable is None or draggable is False):
616            self._process_attr("draggable", draggable)
617        if not (enterkeyhint is None or enterkeyhint is False):
618            self._process_attr("enterkeyhint", enterkeyhint)
619        if not (hidden is None or hidden is False):
620            self._process_attr("hidden", hidden)
621        if not (inert is None or inert is False):
622            self._process_attr("inert", inert)
623        if not (inputmode is None or inputmode is False):
624            self._process_attr("inputmode", inputmode)
625        if not (is_ is None or is_ is False):
626            self._process_attr("is", is_)
627        if not (itemid is None or itemid is False):
628            self._process_attr("itemid", itemid)
629        if not (itemprop is None or itemprop is False):
630            self._process_attr("itemprop", itemprop)
631        if not (itemref is None or itemref is False):
632            self._process_attr("itemref", itemref)
633        if not (itemscope is None or itemscope is False):
634            self._process_attr("itemscope", itemscope)
635        if not (itemtype is None or itemtype is False):
636            self._process_attr("itemtype", itemtype)
637        if not (lang is None or lang is False):
638            self._process_attr("lang", lang)
639        if not (nonce is None or nonce is False):
640            self._process_attr("nonce", nonce)
641        if not (onauxclick is None or onauxclick is False):
642            self._process_attr("onauxclick", onauxclick)
643        if not (onbeforeinput is None or onbeforeinput is False):
644            self._process_attr("onbeforeinput", onbeforeinput)
645        if not (onbeforematch is None or onbeforematch is False):
646            self._process_attr("onbeforematch", onbeforematch)
647        if not (onbeforetoggle is None or onbeforetoggle is False):
648            self._process_attr("onbeforetoggle", onbeforetoggle)
649        if not (onblur is None or onblur is False):
650            self._process_attr("onblur", onblur)
651        if not (oncancel is None or oncancel is False):
652            self._process_attr("oncancel", oncancel)
653        if not (oncanplay is None or oncanplay is False):
654            self._process_attr("oncanplay", oncanplay)
655        if not (oncanplaythrough is None or oncanplaythrough is False):
656            self._process_attr("oncanplaythrough", oncanplaythrough)
657        if not (onchange is None or onchange is False):
658            self._process_attr("onchange", onchange)
659        if not (onclick is None or onclick is False):
660            self._process_attr("onclick", onclick)
661        if not (onclose is None or onclose is False):
662            self._process_attr("onclose", onclose)
663        if not (oncontextlost is None or oncontextlost is False):
664            self._process_attr("oncontextlost", oncontextlost)
665        if not (oncontextmenu is None or oncontextmenu is False):
666            self._process_attr("oncontextmenu", oncontextmenu)
667        if not (oncontextrestored is None or oncontextrestored is False):
668            self._process_attr("oncontextrestored", oncontextrestored)
669        if not (oncopy is None or oncopy is False):
670            self._process_attr("oncopy", oncopy)
671        if not (oncuechange is None or oncuechange is False):
672            self._process_attr("oncuechange", oncuechange)
673        if not (oncut is None or oncut is False):
674            self._process_attr("oncut", oncut)
675        if not (ondblclick is None or ondblclick is False):
676            self._process_attr("ondblclick", ondblclick)
677        if not (ondrag is None or ondrag is False):
678            self._process_attr("ondrag", ondrag)
679        if not (ondragend is None or ondragend is False):
680            self._process_attr("ondragend", ondragend)
681        if not (ondragenter is None or ondragenter is False):
682            self._process_attr("ondragenter", ondragenter)
683        if not (ondragleave is None or ondragleave is False):
684            self._process_attr("ondragleave", ondragleave)
685        if not (ondragover is None or ondragover is False):
686            self._process_attr("ondragover", ondragover)
687        if not (ondragstart is None or ondragstart is False):
688            self._process_attr("ondragstart", ondragstart)
689        if not (ondrop is None or ondrop is False):
690            self._process_attr("ondrop", ondrop)
691        if not (ondurationchange is None or ondurationchange is False):
692            self._process_attr("ondurationchange", ondurationchange)
693        if not (onemptied is None or onemptied is False):
694            self._process_attr("onemptied", onemptied)
695        if not (onended is None or onended is False):
696            self._process_attr("onended", onended)
697        if not (onerror is None or onerror is False):
698            self._process_attr("onerror", onerror)
699        if not (onfocus is None or onfocus is False):
700            self._process_attr("onfocus", onfocus)
701        if not (onformdata is None or onformdata is False):
702            self._process_attr("onformdata", onformdata)
703        if not (oninput is None or oninput is False):
704            self._process_attr("oninput", oninput)
705        if not (oninvalid is None or oninvalid is False):
706            self._process_attr("oninvalid", oninvalid)
707        if not (onkeydown is None or onkeydown is False):
708            self._process_attr("onkeydown", onkeydown)
709        if not (onkeypress is None or onkeypress is False):
710            self._process_attr("onkeypress", onkeypress)
711        if not (onkeyup is None or onkeyup is False):
712            self._process_attr("onkeyup", onkeyup)
713        if not (onload is None or onload is False):
714            self._process_attr("onload", onload)
715        if not (onloadeddata is None or onloadeddata is False):
716            self._process_attr("onloadeddata", onloadeddata)
717        if not (onloadedmetadata is None or onloadedmetadata is False):
718            self._process_attr("onloadedmetadata", onloadedmetadata)
719        if not (onloadstart is None or onloadstart is False):
720            self._process_attr("onloadstart", onloadstart)
721        if not (onmousedown is None or onmousedown is False):
722            self._process_attr("onmousedown", onmousedown)
723        if not (onmouseenter is None or onmouseenter is False):
724            self._process_attr("onmouseenter", onmouseenter)
725        if not (onmouseleave is None or onmouseleave is False):
726            self._process_attr("onmouseleave", onmouseleave)
727        if not (onmousemove is None or onmousemove is False):
728            self._process_attr("onmousemove", onmousemove)
729        if not (onmouseout is None or onmouseout is False):
730            self._process_attr("onmouseout", onmouseout)
731        if not (onmouseover is None or onmouseover is False):
732            self._process_attr("onmouseover", onmouseover)
733        if not (onmouseup is None or onmouseup is False):
734            self._process_attr("onmouseup", onmouseup)
735        if not (onpaste is None or onpaste is False):
736            self._process_attr("onpaste", onpaste)
737        if not (onpause is None or onpause is False):
738            self._process_attr("onpause", onpause)
739        if not (onplay is None or onplay is False):
740            self._process_attr("onplay", onplay)
741        if not (onplaying is None or onplaying is False):
742            self._process_attr("onplaying", onplaying)
743        if not (onprogress is None or onprogress is False):
744            self._process_attr("onprogress", onprogress)
745        if not (onratechange is None or onratechange is False):
746            self._process_attr("onratechange", onratechange)
747        if not (onreset is None or onreset is False):
748            self._process_attr("onreset", onreset)
749        if not (onresize is None or onresize is False):
750            self._process_attr("onresize", onresize)
751        if not (onscroll is None or onscroll is False):
752            self._process_attr("onscroll", onscroll)
753        if not (onscrollend is None or onscrollend is False):
754            self._process_attr("onscrollend", onscrollend)
755        if not (
756            onsecuritypolicyviolation is None
757            or onsecuritypolicyviolation is False
758        ):
759            self._process_attr(
760                "onsecuritypolicyviolation", onsecuritypolicyviolation
761            )
762        if not (onseeked is None or onseeked is False):
763            self._process_attr("onseeked", onseeked)
764        if not (onseeking is None or onseeking is False):
765            self._process_attr("onseeking", onseeking)
766        if not (onselect is None or onselect is False):
767            self._process_attr("onselect", onselect)
768        if not (onslotchange is None or onslotchange is False):
769            self._process_attr("onslotchange", onslotchange)
770        if not (onstalled is None or onstalled is False):
771            self._process_attr("onstalled", onstalled)
772        if not (onsubmit is None or onsubmit is False):
773            self._process_attr("onsubmit", onsubmit)
774        if not (onsuspend is None or onsuspend is False):
775            self._process_attr("onsuspend", onsuspend)
776        if not (ontimeupdate is None or ontimeupdate is False):
777            self._process_attr("ontimeupdate", ontimeupdate)
778        if not (ontoggle is None or ontoggle is False):
779            self._process_attr("ontoggle", ontoggle)
780        if not (onvolumechange is None or onvolumechange is False):
781            self._process_attr("onvolumechange", onvolumechange)
782        if not (onwaiting is None or onwaiting is False):
783            self._process_attr("onwaiting", onwaiting)
784        if not (onwheel is None or onwheel is False):
785            self._process_attr("onwheel", onwheel)
786        if not (popover is None or popover is False):
787            self._process_attr("popover", popover)
788        if not (slot is None or slot is False):
789            self._process_attr("slot", slot)
790        if not (spellcheck is None or spellcheck is False):
791            self._process_attr("spellcheck", spellcheck)
792        if not (style is None or style is False):
793            self._process_attr("style", style)
794        if not (tabindex is None or tabindex is False):
795            self._process_attr("tabindex", tabindex)
796        if not (title is None or title is False):
797            self._process_attr("title", title)
798        if not (translate is None or translate is False):
799            self._process_attr("translate", translate)
800        if not (writingsuggestions is None or writingsuggestions is False):
801            self._process_attr("writingsuggestions", writingsuggestions)

The 'source' element.
Description: Image source for img or media source for video or audio
Categories: none
Parents: picture video audio
Children: empty
Interface: HTMLSourceElement
Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source

source( attrs: Union[Iterable[html_compose.base_attribute.BaseAttribute], Mapping[str, Union[NoneType, str, float, int, bool, Iterable[str | float | int | bool], Mapping[str | float | int | bool, bool]]], Iterable[Union[html_compose.base_attribute.BaseAttribute, Iterable[html_compose.base_attribute.BaseAttribute], Mapping[str, Union[NoneType, str, float, int, bool, Iterable[str | float | int | bool], Mapping[str | float | int | bool, bool]]]]], NoneType] = None, id: str | float | int | bool | None = None, class_: Union[NoneType, str, float, int, bool, Iterable[str | float | int | bool], Mapping[str | float | int | bool, bool]] = None, height: int | str | float | bool | None = None, media: str | float | int | bool | None = None, sizes: str | float | int | bool | None = None, src: str | float | int | bool | None = None, srcset: str | float | int | bool | None = None, type: str | float | int | bool | None = None, width: int | str | float | bool | None = None, accesskey: Union[NoneType, str, float, int, bool, Iterable[str | float | int | bool], Mapping[str | float | int | bool, bool]] = None, autocapitalize: Union[Literal['on', 'off', 'none', 'sentences', 'words', 'characters'], str, float, int, bool, NoneType] = None, autocorrect: Union[Literal['on', 'off'], str, float, int, bool, NoneType] = None, autofocus: bool | str | float | int | None = None, contenteditable: Union[Literal['true', 'plaintext-only', 'false'], str, float, int, bool, NoneType] = None, dir: Union[Literal['ltr', 'rtl', 'auto'], str, float, int, bool, NoneType] = None, draggable: Union[Literal['true', 'false'], str, float, int, bool, NoneType] = None, enterkeyhint: Union[Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'], str, float, int, bool, NoneType] = None, hidden: Union[Literal['until-found', 'hidden', ''], str, float, int, bool, NoneType] = None, inert: bool | str | float | int | None = None, inputmode: Union[Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'], str, float, int, bool, NoneType] = None, is_: str | float | int | bool | None = None, itemid: str | float | int | bool | None = None, itemprop: Union[NoneType, str, float, int, bool, Iterable[str | float | int | bool], Mapping[str | float | int | bool, bool]] = None, itemref: Union[NoneType, str, float, int, bool, Iterable[str | float | int | bool], Mapping[str | float | int | bool, bool]] = None, itemscope: bool | str | float | int | None = None, itemtype: Union[NoneType, str, float, int, bool, Iterable[str | float | int | bool], Mapping[str | float | int | bool, bool]] = None, lang: str | float | int | bool | None = None, nonce: str | float | int | bool | None = None, onauxclick: str | float | int | bool | None = None, onbeforeinput: str | float | int | bool | None = None, onbeforematch: str | float | int | bool | None = None, onbeforetoggle: str | float | int | bool | None = None, onblur: str | float | int | bool | None = None, oncancel: str | float | int | bool | None = None, oncanplay: str | float | int | bool | None = None, oncanplaythrough: str | float | int | bool | None = None, onchange: str | float | int | bool | None = None, onclick: str | float | int | bool | None = None, onclose: str | float | int | bool | None = None, oncontextlost: str | float | int | bool | None = None, oncontextmenu: str | float | int | bool | None = None, oncontextrestored: str | float | int | bool | None = None, oncopy: str | float | int | bool | None = None, oncuechange: str | float | int | bool | None = None, oncut: str | float | int | bool | None = None, ondblclick: str | float | int | bool | None = None, ondrag: str | float | int | bool | None = None, ondragend: str | float | int | bool | None = None, ondragenter: str | float | int | bool | None = None, ondragleave: str | float | int | bool | None = None, ondragover: str | float | int | bool | None = None, ondragstart: str | float | int | bool | None = None, ondrop: str | float | int | bool | None = None, ondurationchange: str | float | int | bool | None = None, onemptied: str | float | int | bool | None = None, onended: str | float | int | bool | None = None, onerror: str | float | int | bool | None = None, onfocus: str | float | int | bool | None = None, onformdata: str | float | int | bool | None = None, oninput: str | float | int | bool | None = None, oninvalid: str | float | int | bool | None = None, onkeydown: str | float | int | bool | None = None, onkeypress: str | float | int | bool | None = None, onkeyup: str | float | int | bool | None = None, onload: str | float | int | bool | None = None, onloadeddata: str | float | int | bool | None = None, onloadedmetadata: str | float | int | bool | None = None, onloadstart: str | float | int | bool | None = None, onmousedown: str | float | int | bool | None = None, onmouseenter: str | float | int | bool | None = None, onmouseleave: str | float | int | bool | None = None, onmousemove: str | float | int | bool | None = None, onmouseout: str | float | int | bool | None = None, onmouseover: str | float | int | bool | None = None, onmouseup: str | float | int | bool | None = None, onpaste: str | float | int | bool | None = None, onpause: str | float | int | bool | None = None, onplay: str | float | int | bool | None = None, onplaying: str | float | int | bool | None = None, onprogress: str | float | int | bool | None = None, onratechange: str | float | int | bool | None = None, onreset: str | float | int | bool | None = None, onresize: str | float | int | bool | None = None, onscroll: str | float | int | bool | None = None, onscrollend: str | float | int | bool | None = None, onsecuritypolicyviolation: str | float | int | bool | None = None, onseeked: str | float | int | bool | None = None, onseeking: str | float | int | bool | None = None, onselect: str | float | int | bool | None = None, onslotchange: str | float | int | bool | None = None, onstalled: str | float | int | bool | None = None, onsubmit: str | float | int | bool | None = None, onsuspend: str | float | int | bool | None = None, ontimeupdate: str | float | int | bool | None = None, ontoggle: str | float | int | bool | None = None, onvolumechange: str | float | int | bool | None = None, onwaiting: str | float | int | bool | None = None, onwheel: str | float | int | bool | None = None, popover: Union[Literal['auto', 'manual'], str, float, int, bool, NoneType] = None, slot: str | float | int | bool | None = None, spellcheck: Union[Literal['true', 'false', ''], str, float, int, bool, NoneType] = None, style: Union[NoneType, str, float, int, bool, Iterable[str | float | int | bool], Mapping[str | float | int | bool, bool], Mapping[str | float | int | bool, str | float | int | bool]] = None, tabindex: int | str | float | bool | None = None, title: str | float | int | bool | None = None, translate: Union[Literal['yes', 'no'], str, float, int, bool, NoneType] = None, writingsuggestions: Union[Literal['true', 'false', ''], str, float, int, bool, NoneType] = None, children: list | None = None)
 37    def __init__(
 38        self,
 39        attrs: Iterable[BaseAttribute]
 40        | Mapping[str, Resolvable]
 41        | Iterable[
 42            BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable]
 43        ]
 44        | None = None,
 45        id: StrLike | None = None,
 46        class_: Resolvable | None = None,
 47        height: int | StrLike | None = None,
 48        media: StrLike | None = None,
 49        sizes: StrLike | None = None,
 50        src: StrLike | None = None,
 51        srcset: StrLike | None = None,
 52        type: StrLike | None = None,
 53        width: int | StrLike | None = None,
 54        accesskey: Resolvable | StrLike | None = None,
 55        autocapitalize: Literal[
 56            "on", "off", "none", "sentences", "words", "characters"
 57        ]
 58        | StrLike
 59        | None = None,
 60        autocorrect: Literal["on", "off"] | StrLike | None = None,
 61        autofocus: bool | StrLike | None = None,
 62        contenteditable: Literal["true", "plaintext-only", "false"]
 63        | StrLike
 64        | None = None,
 65        dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None,
 66        draggable: Literal["true", "false"] | StrLike | None = None,
 67        enterkeyhint: Literal[
 68            "enter", "done", "go", "next", "previous", "search", "send"
 69        ]
 70        | StrLike
 71        | None = None,
 72        hidden: Literal["until-found", "hidden", ""] | StrLike | None = None,
 73        inert: bool | StrLike | None = None,
 74        inputmode: Literal[
 75            "none",
 76            "text",
 77            "tel",
 78            "email",
 79            "url",
 80            "numeric",
 81            "decimal",
 82            "search",
 83        ]
 84        | StrLike
 85        | None = None,
 86        is_: StrLike | None = None,
 87        itemid: StrLike | None = None,
 88        itemprop: Resolvable | StrLike | None = None,
 89        itemref: Resolvable | StrLike | None = None,
 90        itemscope: bool | StrLike | None = None,
 91        itemtype: Resolvable | StrLike | None = None,
 92        lang: StrLike | None = None,
 93        nonce: StrLike | None = None,
 94        onauxclick: StrLike | None = None,
 95        onbeforeinput: StrLike | None = None,
 96        onbeforematch: StrLike | None = None,
 97        onbeforetoggle: StrLike | None = None,
 98        onblur: StrLike | None = None,
 99        oncancel: StrLike | None = None,
100        oncanplay: StrLike | None = None,
101        oncanplaythrough: StrLike | None = None,
102        onchange: StrLike | None = None,
103        onclick: StrLike | None = None,
104        onclose: StrLike | None = None,
105        oncontextlost: StrLike | None = None,
106        oncontextmenu: StrLike | None = None,
107        oncontextrestored: StrLike | None = None,
108        oncopy: StrLike | None = None,
109        oncuechange: StrLike | None = None,
110        oncut: StrLike | None = None,
111        ondblclick: StrLike | None = None,
112        ondrag: StrLike | None = None,
113        ondragend: StrLike | None = None,
114        ondragenter: StrLike | None = None,
115        ondragleave: StrLike | None = None,
116        ondragover: StrLike | None = None,
117        ondragstart: StrLike | None = None,
118        ondrop: StrLike | None = None,
119        ondurationchange: StrLike | None = None,
120        onemptied: StrLike | None = None,
121        onended: StrLike | None = None,
122        onerror: StrLike | None = None,
123        onfocus: StrLike | None = None,
124        onformdata: StrLike | None = None,
125        oninput: StrLike | None = None,
126        oninvalid: StrLike | None = None,
127        onkeydown: StrLike | None = None,
128        onkeypress: StrLike | None = None,
129        onkeyup: StrLike | None = None,
130        onload: StrLike | None = None,
131        onloadeddata: StrLike | None = None,
132        onloadedmetadata: StrLike | None = None,
133        onloadstart: StrLike | None = None,
134        onmousedown: StrLike | None = None,
135        onmouseenter: StrLike | None = None,
136        onmouseleave: StrLike | None = None,
137        onmousemove: StrLike | None = None,
138        onmouseout: StrLike | None = None,
139        onmouseover: StrLike | None = None,
140        onmouseup: StrLike | None = None,
141        onpaste: StrLike | None = None,
142        onpause: StrLike | None = None,
143        onplay: StrLike | None = None,
144        onplaying: StrLike | None = None,
145        onprogress: StrLike | None = None,
146        onratechange: StrLike | None = None,
147        onreset: StrLike | None = None,
148        onresize: StrLike | None = None,
149        onscroll: StrLike | None = None,
150        onscrollend: StrLike | None = None,
151        onsecuritypolicyviolation: StrLike | None = None,
152        onseeked: StrLike | None = None,
153        onseeking: StrLike | None = None,
154        onselect: StrLike | None = None,
155        onslotchange: StrLike | None = None,
156        onstalled: StrLike | None = None,
157        onsubmit: StrLike | None = None,
158        onsuspend: StrLike | None = None,
159        ontimeupdate: StrLike | None = None,
160        ontoggle: StrLike | None = None,
161        onvolumechange: StrLike | None = None,
162        onwaiting: StrLike | None = None,
163        onwheel: StrLike | None = None,
164        popover: Literal["auto", "manual"] | StrLike | None = None,
165        slot: StrLike | None = None,
166        spellcheck: Literal["true", "false", ""] | StrLike | None = None,
167        style: Resolvable | Mapping[StrLike, StrLike] | None = None,
168        tabindex: int | StrLike | None = None,
169        title: StrLike | None = None,
170        translate: Literal["yes", "no"] | StrLike | None = None,
171        writingsuggestions: Literal["true", "false", ""]
172        | StrLike
173        | None = None,
174        children: list | None = None,
175    ) -> None:
176        """
177        Initialize 'source' (Image source for img or media source for video or audio) element.  
178        Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source
179
180        Args:
181            attrs: 
182                A list or dictionary of attributes for the element
183            
184            id:
185                The element's ID
186            
187            class_:
188                Classes to which the element belongs
189            
190            height:
191                Vertical dimension
192            
193            media:
194                Applicable media.  
195                Value hint: Valid media query list
196            
197            sizes:
198                Image sizes for different page layouts.  
199                Value hint: Valid source size list
200            
201            src:
202                Address of the resource.  
203                Value hint: Valid non-empty URL potentially surrounded by spaces
204            
205            srcset:
206                Images to use in different situations, e.g., high-resolution displays, small monitors, etc..  
207                Value hint: Comma-separated list of image candidate strings
208            
209            type:
210                Type of embedded resource.  
211                Value hint: Valid MIME type string
212            
213            width:
214                Horizontal dimension
215            
216            accesskey:
217                Keyboard shortcut to activate or focus element
218            
219            autocapitalize:
220                Recommended autocapitalization behavior (for supported input methods)
221            
222            autocorrect:
223                Recommended autocorrection behavior (for supported input methods)
224            
225            autofocus:
226                Automatically focus the element when the page is loaded
227            
228            contenteditable:
229                Whether the element is editable
230            
231            dir:
232                The text directionality of the element
233            
234            draggable:
235                Whether the element is draggable
236            
237            enterkeyhint:
238                Hint for selecting an enter key action
239            
240            hidden:
241                Whether the element is relevant
242            
243            inert:
244                Whether the element is inert.
245            
246            inputmode:
247                Hint for selecting an input modality
248            
249            is_:
250                Creates a customized built-in element.  
251                Value hint: Valid custom element name of a defined customized built-in element
252            
253            itemid:
254                Global identifier for a microdata item.  
255                Value hint: Valid URL potentially surrounded by spaces
256            
257            itemprop:
258                Property names of a microdata item
259            
260            itemref:
261                Referenced elements
262            
263            itemscope:
264                Introduces a microdata item
265            
266            itemtype:
267                Item types of a microdata item
268            
269            lang:
270                Language of the element.  
271                Value hint: Valid BCP 47 language tag or the empty string
272            
273            nonce:
274                Cryptographic nonce used in Content Security Policy checks [CSP]
275            
276            onauxclick:
277                auxclick event handler.  
278                Value hint: Event handler content attribute
279            
280            onbeforeinput:
281                beforeinput event handler.  
282                Value hint: Event handler content attribute
283            
284            onbeforematch:
285                beforematch event handler.  
286                Value hint: Event handler content attribute
287            
288            onbeforetoggle:
289                beforetoggle event handler.  
290                Value hint: Event handler content attribute
291            
292            onblur:
293                blur event handler.  
294                Value hint: Event handler content attribute
295            
296            oncancel:
297                cancel event handler.  
298                Value hint: Event handler content attribute
299            
300            oncanplay:
301                canplay event handler.  
302                Value hint: Event handler content attribute
303            
304            oncanplaythrough:
305                canplaythrough event handler.  
306                Value hint: Event handler content attribute
307            
308            onchange:
309                change event handler.  
310                Value hint: Event handler content attribute
311            
312            onclick:
313                click event handler.  
314                Value hint: Event handler content attribute
315            
316            onclose:
317                close event handler.  
318                Value hint: Event handler content attribute
319            
320            oncontextlost:
321                contextlost event handler.  
322                Value hint: Event handler content attribute
323            
324            oncontextmenu:
325                contextmenu event handler.  
326                Value hint: Event handler content attribute
327            
328            oncontextrestored:
329                contextrestored event handler.  
330                Value hint: Event handler content attribute
331            
332            oncopy:
333                copy event handler.  
334                Value hint: Event handler content attribute
335            
336            oncuechange:
337                cuechange event handler.  
338                Value hint: Event handler content attribute
339            
340            oncut:
341                cut event handler.  
342                Value hint: Event handler content attribute
343            
344            ondblclick:
345                dblclick event handler.  
346                Value hint: Event handler content attribute
347            
348            ondrag:
349                drag event handler.  
350                Value hint: Event handler content attribute
351            
352            ondragend:
353                dragend event handler.  
354                Value hint: Event handler content attribute
355            
356            ondragenter:
357                dragenter event handler.  
358                Value hint: Event handler content attribute
359            
360            ondragleave:
361                dragleave event handler.  
362                Value hint: Event handler content attribute
363            
364            ondragover:
365                dragover event handler.  
366                Value hint: Event handler content attribute
367            
368            ondragstart:
369                dragstart event handler.  
370                Value hint: Event handler content attribute
371            
372            ondrop:
373                drop event handler.  
374                Value hint: Event handler content attribute
375            
376            ondurationchange:
377                durationchange event handler.  
378                Value hint: Event handler content attribute
379            
380            onemptied:
381                emptied event handler.  
382                Value hint: Event handler content attribute
383            
384            onended:
385                ended event handler.  
386                Value hint: Event handler content attribute
387            
388            onerror:
389                error event handler.  
390                Value hint: Event handler content attribute
391            
392            onfocus:
393                focus event handler.  
394                Value hint: Event handler content attribute
395            
396            onformdata:
397                formdata event handler.  
398                Value hint: Event handler content attribute
399            
400            oninput:
401                input event handler.  
402                Value hint: Event handler content attribute
403            
404            oninvalid:
405                invalid event handler.  
406                Value hint: Event handler content attribute
407            
408            onkeydown:
409                keydown event handler.  
410                Value hint: Event handler content attribute
411            
412            onkeypress:
413                keypress event handler.  
414                Value hint: Event handler content attribute
415            
416            onkeyup:
417                keyup event handler.  
418                Value hint: Event handler content attribute
419            
420            onload:
421                load event handler.  
422                Value hint: Event handler content attribute
423            
424            onloadeddata:
425                loadeddata event handler.  
426                Value hint: Event handler content attribute
427            
428            onloadedmetadata:
429                loadedmetadata event handler.  
430                Value hint: Event handler content attribute
431            
432            onloadstart:
433                loadstart event handler.  
434                Value hint: Event handler content attribute
435            
436            onmousedown:
437                mousedown event handler.  
438                Value hint: Event handler content attribute
439            
440            onmouseenter:
441                mouseenter event handler.  
442                Value hint: Event handler content attribute
443            
444            onmouseleave:
445                mouseleave event handler.  
446                Value hint: Event handler content attribute
447            
448            onmousemove:
449                mousemove event handler.  
450                Value hint: Event handler content attribute
451            
452            onmouseout:
453                mouseout event handler.  
454                Value hint: Event handler content attribute
455            
456            onmouseover:
457                mouseover event handler.  
458                Value hint: Event handler content attribute
459            
460            onmouseup:
461                mouseup event handler.  
462                Value hint: Event handler content attribute
463            
464            onpaste:
465                paste event handler.  
466                Value hint: Event handler content attribute
467            
468            onpause:
469                pause event handler.  
470                Value hint: Event handler content attribute
471            
472            onplay:
473                play event handler.  
474                Value hint: Event handler content attribute
475            
476            onplaying:
477                playing event handler.  
478                Value hint: Event handler content attribute
479            
480            onprogress:
481                progress event handler.  
482                Value hint: Event handler content attribute
483            
484            onratechange:
485                ratechange event handler.  
486                Value hint: Event handler content attribute
487            
488            onreset:
489                reset event handler.  
490                Value hint: Event handler content attribute
491            
492            onresize:
493                resize event handler.  
494                Value hint: Event handler content attribute
495            
496            onscroll:
497                scroll event handler.  
498                Value hint: Event handler content attribute
499            
500            onscrollend:
501                scrollend event handler.  
502                Value hint: Event handler content attribute
503            
504            onsecuritypolicyviolation:
505                securitypolicyviolation event handler.  
506                Value hint: Event handler content attribute
507            
508            onseeked:
509                seeked event handler.  
510                Value hint: Event handler content attribute
511            
512            onseeking:
513                seeking event handler.  
514                Value hint: Event handler content attribute
515            
516            onselect:
517                select event handler.  
518                Value hint: Event handler content attribute
519            
520            onslotchange:
521                slotchange event handler.  
522                Value hint: Event handler content attribute
523            
524            onstalled:
525                stalled event handler.  
526                Value hint: Event handler content attribute
527            
528            onsubmit:
529                submit event handler.  
530                Value hint: Event handler content attribute
531            
532            onsuspend:
533                suspend event handler.  
534                Value hint: Event handler content attribute
535            
536            ontimeupdate:
537                timeupdate event handler.  
538                Value hint: Event handler content attribute
539            
540            ontoggle:
541                toggle event handler.  
542                Value hint: Event handler content attribute
543            
544            onvolumechange:
545                volumechange event handler.  
546                Value hint: Event handler content attribute
547            
548            onwaiting:
549                waiting event handler.  
550                Value hint: Event handler content attribute
551            
552            onwheel:
553                wheel event handler.  
554                Value hint: Event handler content attribute
555            
556            popover:
557                Makes the element a popover element
558            
559            slot:
560                The element's desired slot
561            
562            spellcheck:
563                Whether the element is to have its spelling and grammar checked
564            
565            style:
566                Presentational and formatting instructions.  
567                Value hint: CSS declarations*
568            
569            tabindex:
570                Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation
571            
572            title:
573                Advisory information for the element
574            
575            translate:
576                Whether the element is to be translated when the page is localized
577            
578            writingsuggestions:
579                Whether the element can offer writing suggestions or not.
580            
581        """  # fmt: skip
582        super().__init__(
583            "source", void_element=True, attrs=attrs, children=children
584        )
585        if not (id is None or id is False):
586            self._process_attr("id", id)
587        if not (class_ is None or class_ is False):
588            self._process_attr("class", class_)
589        if not (height is None or height is False):
590            self._process_attr("height", height)
591        if not (media is None or media is False):
592            self._process_attr("media", media)
593        if not (sizes is None or sizes is False):
594            self._process_attr("sizes", sizes)
595        if not (src is None or src is False):
596            self._process_attr("src", src)
597        if not (srcset is None or srcset is False):
598            self._process_attr("srcset", srcset)
599        if not (type is None or type is False):
600            self._process_attr("type", type)
601        if not (width is None or width is False):
602            self._process_attr("width", width)
603        if not (accesskey is None or accesskey is False):
604            self._process_attr("accesskey", accesskey)
605        if not (autocapitalize is None or autocapitalize is False):
606            self._process_attr("autocapitalize", autocapitalize)
607        if not (autocorrect is None or autocorrect is False):
608            self._process_attr("autocorrect", autocorrect)
609        if not (autofocus is None or autofocus is False):
610            self._process_attr("autofocus", autofocus)
611        if not (contenteditable is None or contenteditable is False):
612            self._process_attr("contenteditable", contenteditable)
613        if not (dir is None or dir is False):
614            self._process_attr("dir", dir)
615        if not (draggable is None or draggable is False):
616            self._process_attr("draggable", draggable)
617        if not (enterkeyhint is None or enterkeyhint is False):
618            self._process_attr("enterkeyhint", enterkeyhint)
619        if not (hidden is None or hidden is False):
620            self._process_attr("hidden", hidden)
621        if not (inert is None or inert is False):
622            self._process_attr("inert", inert)
623        if not (inputmode is None or inputmode is False):
624            self._process_attr("inputmode", inputmode)
625        if not (is_ is None or is_ is False):
626            self._process_attr("is", is_)
627        if not (itemid is None or itemid is False):
628            self._process_attr("itemid", itemid)
629        if not (itemprop is None or itemprop is False):
630            self._process_attr("itemprop", itemprop)
631        if not (itemref is None or itemref is False):
632            self._process_attr("itemref", itemref)
633        if not (itemscope is None or itemscope is False):
634            self._process_attr("itemscope", itemscope)
635        if not (itemtype is None or itemtype is False):
636            self._process_attr("itemtype", itemtype)
637        if not (lang is None or lang is False):
638            self._process_attr("lang", lang)
639        if not (nonce is None or nonce is False):
640            self._process_attr("nonce", nonce)
641        if not (onauxclick is None or onauxclick is False):
642            self._process_attr("onauxclick", onauxclick)
643        if not (onbeforeinput is None or onbeforeinput is False):
644            self._process_attr("onbeforeinput", onbeforeinput)
645        if not (onbeforematch is None or onbeforematch is False):
646            self._process_attr("onbeforematch", onbeforematch)
647        if not (onbeforetoggle is None or onbeforetoggle is False):
648            self._process_attr("onbeforetoggle", onbeforetoggle)
649        if not (onblur is None or onblur is False):
650            self._process_attr("onblur", onblur)
651        if not (oncancel is None or oncancel is False):
652            self._process_attr("oncancel", oncancel)
653        if not (oncanplay is None or oncanplay is False):
654            self._process_attr("oncanplay", oncanplay)
655        if not (oncanplaythrough is None or oncanplaythrough is False):
656            self._process_attr("oncanplaythrough", oncanplaythrough)
657        if not (onchange is None or onchange is False):
658            self._process_attr("onchange", onchange)
659        if not (onclick is None or onclick is False):
660            self._process_attr("onclick", onclick)
661        if not (onclose is None or onclose is False):
662            self._process_attr("onclose", onclose)
663        if not (oncontextlost is None or oncontextlost is False):
664            self._process_attr("oncontextlost", oncontextlost)
665        if not (oncontextmenu is None or oncontextmenu is False):
666            self._process_attr("oncontextmenu", oncontextmenu)
667        if not (oncontextrestored is None or oncontextrestored is False):
668            self._process_attr("oncontextrestored", oncontextrestored)
669        if not (oncopy is None or oncopy is False):
670            self._process_attr("oncopy", oncopy)
671        if not (oncuechange is None or oncuechange is False):
672            self._process_attr("oncuechange", oncuechange)
673        if not (oncut is None or oncut is False):
674            self._process_attr("oncut", oncut)
675        if not (ondblclick is None or ondblclick is False):
676            self._process_attr("ondblclick", ondblclick)
677        if not (ondrag is None or ondrag is False):
678            self._process_attr("ondrag", ondrag)
679        if not (ondragend is None or ondragend is False):
680            self._process_attr("ondragend", ondragend)
681        if not (ondragenter is None or ondragenter is False):
682            self._process_attr("ondragenter", ondragenter)
683        if not (ondragleave is None or ondragleave is False):
684            self._process_attr("ondragleave", ondragleave)
685        if not (ondragover is None or ondragover is False):
686            self._process_attr("ondragover", ondragover)
687        if not (ondragstart is None or ondragstart is False):
688            self._process_attr("ondragstart", ondragstart)
689        if not (ondrop is None or ondrop is False):
690            self._process_attr("ondrop", ondrop)
691        if not (ondurationchange is None or ondurationchange is False):
692            self._process_attr("ondurationchange", ondurationchange)
693        if not (onemptied is None or onemptied is False):
694            self._process_attr("onemptied", onemptied)
695        if not (onended is None or onended is False):
696            self._process_attr("onended", onended)
697        if not (onerror is None or onerror is False):
698            self._process_attr("onerror", onerror)
699        if not (onfocus is None or onfocus is False):
700            self._process_attr("onfocus", onfocus)
701        if not (onformdata is None or onformdata is False):
702            self._process_attr("onformdata", onformdata)
703        if not (oninput is None or oninput is False):
704            self._process_attr("oninput", oninput)
705        if not (oninvalid is None or oninvalid is False):
706            self._process_attr("oninvalid", oninvalid)
707        if not (onkeydown is None or onkeydown is False):
708            self._process_attr("onkeydown", onkeydown)
709        if not (onkeypress is None or onkeypress is False):
710            self._process_attr("onkeypress", onkeypress)
711        if not (onkeyup is None or onkeyup is False):
712            self._process_attr("onkeyup", onkeyup)
713        if not (onload is None or onload is False):
714            self._process_attr("onload", onload)
715        if not (onloadeddata is None or onloadeddata is False):
716            self._process_attr("onloadeddata", onloadeddata)
717        if not (onloadedmetadata is None or onloadedmetadata is False):
718            self._process_attr("onloadedmetadata", onloadedmetadata)
719        if not (onloadstart is None or onloadstart is False):
720            self._process_attr("onloadstart", onloadstart)
721        if not (onmousedown is None or onmousedown is False):
722            self._process_attr("onmousedown", onmousedown)
723        if not (onmouseenter is None or onmouseenter is False):
724            self._process_attr("onmouseenter", onmouseenter)
725        if not (onmouseleave is None or onmouseleave is False):
726            self._process_attr("onmouseleave", onmouseleave)
727        if not (onmousemove is None or onmousemove is False):
728            self._process_attr("onmousemove", onmousemove)
729        if not (onmouseout is None or onmouseout is False):
730            self._process_attr("onmouseout", onmouseout)
731        if not (onmouseover is None or onmouseover is False):
732            self._process_attr("onmouseover", onmouseover)
733        if not (onmouseup is None or onmouseup is False):
734            self._process_attr("onmouseup", onmouseup)
735        if not (onpaste is None or onpaste is False):
736            self._process_attr("onpaste", onpaste)
737        if not (onpause is None or onpause is False):
738            self._process_attr("onpause", onpause)
739        if not (onplay is None or onplay is False):
740            self._process_attr("onplay", onplay)
741        if not (onplaying is None or onplaying is False):
742            self._process_attr("onplaying", onplaying)
743        if not (onprogress is None or onprogress is False):
744            self._process_attr("onprogress", onprogress)
745        if not (onratechange is None or onratechange is False):
746            self._process_attr("onratechange", onratechange)
747        if not (onreset is None or onreset is False):
748            self._process_attr("onreset", onreset)
749        if not (onresize is None or onresize is False):
750            self._process_attr("onresize", onresize)
751        if not (onscroll is None or onscroll is False):
752            self._process_attr("onscroll", onscroll)
753        if not (onscrollend is None or onscrollend is False):
754            self._process_attr("onscrollend", onscrollend)
755        if not (
756            onsecuritypolicyviolation is None
757            or onsecuritypolicyviolation is False
758        ):
759            self._process_attr(
760                "onsecuritypolicyviolation", onsecuritypolicyviolation
761            )
762        if not (onseeked is None or onseeked is False):
763            self._process_attr("onseeked", onseeked)
764        if not (onseeking is None or onseeking is False):
765            self._process_attr("onseeking", onseeking)
766        if not (onselect is None or onselect is False):
767            self._process_attr("onselect", onselect)
768        if not (onslotchange is None or onslotchange is False):
769            self._process_attr("onslotchange", onslotchange)
770        if not (onstalled is None or onstalled is False):
771            self._process_attr("onstalled", onstalled)
772        if not (onsubmit is None or onsubmit is False):
773            self._process_attr("onsubmit", onsubmit)
774        if not (onsuspend is None or onsuspend is False):
775            self._process_attr("onsuspend", onsuspend)
776        if not (ontimeupdate is None or ontimeupdate is False):
777            self._process_attr("ontimeupdate", ontimeupdate)
778        if not (ontoggle is None or ontoggle is False):
779            self._process_attr("ontoggle", ontoggle)
780        if not (onvolumechange is None or onvolumechange is False):
781            self._process_attr("onvolumechange", onvolumechange)
782        if not (onwaiting is None or onwaiting is False):
783            self._process_attr("onwaiting", onwaiting)
784        if not (onwheel is None or onwheel is False):
785            self._process_attr("onwheel", onwheel)
786        if not (popover is None or popover is False):
787            self._process_attr("popover", popover)
788        if not (slot is None or slot is False):
789            self._process_attr("slot", slot)
790        if not (spellcheck is None or spellcheck is False):
791            self._process_attr("spellcheck", spellcheck)
792        if not (style is None or style is False):
793            self._process_attr("style", style)
794        if not (tabindex is None or tabindex is False):
795            self._process_attr("tabindex", tabindex)
796        if not (title is None or title is False):
797            self._process_attr("title", title)
798        if not (translate is None or translate is False):
799            self._process_attr("translate", translate)
800        if not (writingsuggestions is None or writingsuggestions is False):
801            self._process_attr("writingsuggestions", writingsuggestions)

Initialize 'source' (Image source for img or media source for video or audio) element.
Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source

Args: attrs: A list or dictionary of attributes for the element

id:
    The element's ID

class_:
    Classes to which the element belongs

height:
    Vertical dimension

media:
    Applicable media.  
    Value hint: Valid media query list

sizes:
    Image sizes for different page layouts.  
    Value hint: Valid source size list

src:
    Address of the resource.  
    Value hint: Valid non-empty URL potentially surrounded by spaces

srcset:
    Images to use in different situations, e.g., high-resolution displays, small monitors, etc..  
    Value hint: Comma-separated list of image candidate strings

type:
    Type of embedded resource.  
    Value hint: Valid MIME type string

width:
    Horizontal dimension

accesskey:
    Keyboard shortcut to activate or focus element

autocapitalize:
    Recommended autocapitalization behavior (for supported input methods)

autocorrect:
    Recommended autocorrection behavior (for supported input methods)

autofocus:
    Automatically focus the element when the page is loaded

contenteditable:
    Whether the element is editable

dir:
    The text directionality of the element

draggable:
    Whether the element is draggable

enterkeyhint:
    Hint for selecting an enter key action

hidden:
    Whether the element is relevant

inert:
    Whether the element is inert.

inputmode:
    Hint for selecting an input modality

is_:
    Creates a customized built-in element.  
    Value hint: Valid custom element name of a defined customized built-in element

itemid:
    Global identifier for a microdata item.  
    Value hint: Valid URL potentially surrounded by spaces

itemprop:
    Property names of a microdata item

itemref:
    Referenced elements

itemscope:
    Introduces a microdata item

itemtype:
    Item types of a microdata item

lang:
    Language of the element.  
    Value hint: Valid BCP 47 language tag or the empty string

nonce:
    Cryptographic nonce used in Content Security Policy checks [CSP]

onauxclick:
    auxclick event handler.  
    Value hint: Event handler content attribute

onbeforeinput:
    beforeinput event handler.  
    Value hint: Event handler content attribute

onbeforematch:
    beforematch event handler.  
    Value hint: Event handler content attribute

onbeforetoggle:
    beforetoggle event handler.  
    Value hint: Event handler content attribute

onblur:
    blur event handler.  
    Value hint: Event handler content attribute

oncancel:
    cancel event handler.  
    Value hint: Event handler content attribute

oncanplay:
    canplay event handler.  
    Value hint: Event handler content attribute

oncanplaythrough:
    canplaythrough event handler.  
    Value hint: Event handler content attribute

onchange:
    change event handler.  
    Value hint: Event handler content attribute

onclick:
    click event handler.  
    Value hint: Event handler content attribute

onclose:
    close event handler.  
    Value hint: Event handler content attribute

oncontextlost:
    contextlost event handler.  
    Value hint: Event handler content attribute

oncontextmenu:
    contextmenu event handler.  
    Value hint: Event handler content attribute

oncontextrestored:
    contextrestored event handler.  
    Value hint: Event handler content attribute

oncopy:
    copy event handler.  
    Value hint: Event handler content attribute

oncuechange:
    cuechange event handler.  
    Value hint: Event handler content attribute

oncut:
    cut event handler.  
    Value hint: Event handler content attribute

ondblclick:
    dblclick event handler.  
    Value hint: Event handler content attribute

ondrag:
    drag event handler.  
    Value hint: Event handler content attribute

ondragend:
    dragend event handler.  
    Value hint: Event handler content attribute

ondragenter:
    dragenter event handler.  
    Value hint: Event handler content attribute

ondragleave:
    dragleave event handler.  
    Value hint: Event handler content attribute

ondragover:
    dragover event handler.  
    Value hint: Event handler content attribute

ondragstart:
    dragstart event handler.  
    Value hint: Event handler content attribute

ondrop:
    drop event handler.  
    Value hint: Event handler content attribute

ondurationchange:
    durationchange event handler.  
    Value hint: Event handler content attribute

onemptied:
    emptied event handler.  
    Value hint: Event handler content attribute

onended:
    ended event handler.  
    Value hint: Event handler content attribute

onerror:
    error event handler.  
    Value hint: Event handler content attribute

onfocus:
    focus event handler.  
    Value hint: Event handler content attribute

onformdata:
    formdata event handler.  
    Value hint: Event handler content attribute

oninput:
    input event handler.  
    Value hint: Event handler content attribute

oninvalid:
    invalid event handler.  
    Value hint: Event handler content attribute

onkeydown:
    keydown event handler.  
    Value hint: Event handler content attribute

onkeypress:
    keypress event handler.  
    Value hint: Event handler content attribute

onkeyup:
    keyup event handler.  
    Value hint: Event handler content attribute

onload:
    load event handler.  
    Value hint: Event handler content attribute

onloadeddata:
    loadeddata event handler.  
    Value hint: Event handler content attribute

onloadedmetadata:
    loadedmetadata event handler.  
    Value hint: Event handler content attribute

onloadstart:
    loadstart event handler.  
    Value hint: Event handler content attribute

onmousedown:
    mousedown event handler.  
    Value hint: Event handler content attribute

onmouseenter:
    mouseenter event handler.  
    Value hint: Event handler content attribute

onmouseleave:
    mouseleave event handler.  
    Value hint: Event handler content attribute

onmousemove:
    mousemove event handler.  
    Value hint: Event handler content attribute

onmouseout:
    mouseout event handler.  
    Value hint: Event handler content attribute

onmouseover:
    mouseover event handler.  
    Value hint: Event handler content attribute

onmouseup:
    mouseup event handler.  
    Value hint: Event handler content attribute

onpaste:
    paste event handler.  
    Value hint: Event handler content attribute

onpause:
    pause event handler.  
    Value hint: Event handler content attribute

onplay:
    play event handler.  
    Value hint: Event handler content attribute

onplaying:
    playing event handler.  
    Value hint: Event handler content attribute

onprogress:
    progress event handler.  
    Value hint: Event handler content attribute

onratechange:
    ratechange event handler.  
    Value hint: Event handler content attribute

onreset:
    reset event handler.  
    Value hint: Event handler content attribute

onresize:
    resize event handler.  
    Value hint: Event handler content attribute

onscroll:
    scroll event handler.  
    Value hint: Event handler content attribute

onscrollend:
    scrollend event handler.  
    Value hint: Event handler content attribute

onsecuritypolicyviolation:
    securitypolicyviolation event handler.  
    Value hint: Event handler content attribute

onseeked:
    seeked event handler.  
    Value hint: Event handler content attribute

onseeking:
    seeking event handler.  
    Value hint: Event handler content attribute

onselect:
    select event handler.  
    Value hint: Event handler content attribute

onslotchange:
    slotchange event handler.  
    Value hint: Event handler content attribute

onstalled:
    stalled event handler.  
    Value hint: Event handler content attribute

onsubmit:
    submit event handler.  
    Value hint: Event handler content attribute

onsuspend:
    suspend event handler.  
    Value hint: Event handler content attribute

ontimeupdate:
    timeupdate event handler.  
    Value hint: Event handler content attribute

ontoggle:
    toggle event handler.  
    Value hint: Event handler content attribute

onvolumechange:
    volumechange event handler.  
    Value hint: Event handler content attribute

onwaiting:
    waiting event handler.  
    Value hint: Event handler content attribute

onwheel:
    wheel event handler.  
    Value hint: Event handler content attribute

popover:
    Makes the element a popover element

slot:
    The element's desired slot

spellcheck:
    Whether the element is to have its spelling and grammar checked

style:
    Presentational and formatting instructions.  
    Value hint: CSS declarations*

tabindex:
    Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation

title:
    Advisory information for the element

translate:
    Whether the element is to be translated when the page is localized

writingsuggestions:
    Whether the element can offer writing suggestions or not.
tag = 'source'
categories = ['none']
26    class hint(GlobalAttrs, SourceAttrs):
27        """
28        Type hints for "source" attrs  
29        This class holds functions which return BaseAttributes  
30        Which you can add to your element attrs  
31        """  # fmt: skip
32
33        pass

Type hints for "source" attrs
This class holds functions which return BaseAttributes
Which you can add to your element attrs