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