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