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