001package react4j.dom.proptypes.html; 002 003import javax.annotation.Nonnull; 004import javax.annotation.Nullable; 005import jsinterop.annotations.JsOverlay; 006import jsinterop.annotations.JsPackage; 007import jsinterop.annotations.JsProperty; 008import jsinterop.annotations.JsType; 009import jsinterop.base.Any; 010import jsinterop.base.Js; 011import jsinterop.base.JsPropertyMap; 012import react4j.React; 013import react4j.ReactNode; 014import react4j.dom.events.ClipboardEventHandler; 015import react4j.dom.events.CompositionEventHandler; 016import react4j.dom.events.DragEventHandler; 017import react4j.dom.events.FocusEventHandler; 018import react4j.dom.events.FormEventHandler; 019import react4j.dom.events.KeyboardEventHandler; 020import react4j.dom.events.MouseEventHandler; 021import react4j.dom.events.ReactEventHandler; 022import react4j.dom.events.TouchEventHandler; 023import react4j.dom.events.UIEventHandler; 024import react4j.dom.events.WheelEventHandler; 025import react4j.dom.proptypes.html.attributeTypes.InputType; 026import react4j.dom.proptypes.html.attributeTypes.YesNo; 027import static org.realityforge.braincheck.Guards.*; 028 029@SuppressWarnings( "unused" ) 030@JsType( isNative = true, namespace = JsPackage.GLOBAL, name = "Object" ) 031public class HtmlGlobalFields<T extends HtmlGlobalFields<T>> 032{ 033 @Nullable 034 public ReactNode children; 035 @Nullable 036 public String key; 037 @Nullable 038 public RefConsumer ref; 039 040 @JsOverlay 041 @Nonnull 042 public final T ref( @Nullable final RefConsumer callback ) 043 { 044 ref = callback; 045 return self(); 046 } 047 048 @JsOverlay 049 @Nonnull 050 public final T key( final int value ) 051 { 052 return key( String.valueOf( value ) ); 053 } 054 055 @JsOverlay 056 @Nonnull 057 public final T key( @Nonnull final String value ) 058 { 059 key = value; 060 return self(); 061 } 062 063 @JsOverlay 064 @Nonnull 065 public final T dangerouslySetInnerHTML( @Nonnull final String html ) 066 { 067 setDangerouslySetInnerHTML( JsPropertyMap.of( "__html", html ) ); 068 return self(); 069 } 070 071 @JsOverlay 072 @Nonnull 073 public final T prop( @Nonnull final String key, @Nullable final Any value ) 074 { 075 Js.asPropertyMap( this ).set( key, value ); 076 return self(); 077 } 078 079 @JsProperty 080 protected native void setDangerouslySetInnerHTML( @Nonnull JsPropertyMap<Object> __html ); 081 082 //React Specific 083 @JsProperty 084 public native boolean isDefaultChecked(); 085 086 @JsProperty 087 protected native void setDefaultChecked( boolean defaultChecked ); 088 089 @JsProperty 090 public native String getDefaultValue(); 091 092 @JsProperty 093 protected native void setDefaultValue( String defaultValue ); 094 095 // Standard HTML Attributes 096 @JsProperty 097 public native String getAccept(); 098 099 @JsProperty 100 protected native void setAccept( String accept ); 101 102 @JsProperty 103 public native String getAcceptCharset(); 104 105 @JsProperty 106 protected native void setAcceptCharset( String acceptCharset ); 107 108 @JsProperty 109 public native String getAccessKey(); 110 111 @JsOverlay 112 @Nonnull 113 public final T accessKey( String accessKey ) 114 { 115 setAccessKey( accessKey ); 116 return self(); 117 } 118 119 @JsProperty 120 protected native void setAccessKey( String accessKey ); 121 122 @JsProperty 123 public native String getAction(); 124 125 @JsProperty 126 protected native void setAction( String action ); 127 128 @JsProperty 129 public native boolean isAllowFullScreen(); 130 131 @JsProperty 132 protected native void setAllowFullScreen( boolean allowFullScreen ); 133 134 @JsProperty 135 public native boolean isAllowTransparency(); 136 137 @JsProperty 138 protected native void setAllowTransparency( boolean allowTransparency ); 139 140 @JsProperty 141 public native String getAlt(); 142 143 @JsProperty 144 protected native void setAlt( String alt ); 145 146 @JsProperty 147 public native boolean isAsync(); 148 149 @JsProperty 150 protected native void setAsync( boolean async ); 151 152 @JsProperty 153 public native String getAutoComplete(); 154 155 @JsProperty 156 protected native void setAutoComplete( String autoComplete ); 157 158 @JsProperty 159 public native boolean isAutoFocus(); 160 161 @JsProperty 162 protected native void setAutoFocus( boolean autoFocus ); 163 164 @JsProperty 165 public native boolean isAutoPlay(); 166 167 @JsProperty 168 protected native void setAutoPlay( boolean autoPlay ); 169 170 @JsProperty 171 public native boolean isCapture(); 172 173 @JsProperty 174 protected native void setCapture( boolean capture ); 175 176 @JsProperty 177 public native String getCellPadding(); 178 179 @JsProperty 180 protected native void setCellPadding( String cellPadding ); 181 182 @JsProperty 183 public native String getCellSpacing(); 184 185 @JsProperty 186 protected native void setCellSpacing( String cellSpacing ); 187 188 @JsProperty 189 public native String getCharSet(); 190 191 @JsProperty 192 protected native void setCharSet( String charSet ); 193 194 @JsProperty 195 public native String getChallenge(); 196 197 @JsProperty 198 protected native void setChallenge( String challenge ); 199 200 @JsProperty 201 public native boolean isChecked(); 202 203 @JsProperty 204 protected native void setChecked( boolean checked ); 205 206 @JsProperty 207 public native String getClassID(); 208 209 @JsProperty 210 protected native void setClassID( String classID ); 211 212 @JsProperty 213 public native String getClassName(); 214 215 @SuppressWarnings( "StringConcatenationInLoop" ) 216 @JsOverlay 217 @Nonnull 218 public final T className( final String... elements ) 219 { 220 String className = null; 221 for ( final String element : elements ) 222 { 223 if ( null != element ) 224 { 225 if ( React.shouldCheckInvariants() ) 226 { 227 invariant( () -> !element.equals( "" ) && !element.matches( "^\\s+$" ), 228 () -> "Empty classname element supplied. Remove the element." ); 229 invariant( () -> !element.matches( "^\\s.*$" ), 230 () -> "Classname element '" + element + "' starts with whitespace. Remove the whitespace." ); 231 invariant( () -> !element.matches( "^.*\\s$" ), 232 () -> "Classname element '" + element + "' ends with whitespace. Remove the whitespace." ); 233 } 234 if ( null == className ) 235 { 236 className = element; 237 } 238 else 239 { 240 className += " " + element; 241 } 242 } 243 } 244 if ( null != className ) 245 { 246 setClassName( className ); 247 } 248 return self(); 249 } 250 251 @JsProperty 252 protected native void setClassName( String className ); 253 254 @JsProperty 255 public native int getCols(); 256 257 @JsProperty 258 protected native void setCols( int cols ); 259 260 @JsProperty 261 public native int getColSpan(); 262 263 @JsProperty 264 protected native void setColSpan( int colSpan ); 265 266 @JsProperty 267 public native String getContent(); 268 269 @JsProperty 270 protected native void setContent( String content ); 271 272 @JsProperty 273 public native boolean isContentEditable(); 274 275 @JsOverlay 276 @Nonnull 277 public final T contentEditable( boolean contentEditable ) 278 { 279 setContentEditable( contentEditable ); 280 return self(); 281 } 282 283 @JsProperty 284 protected native void setContentEditable( boolean contentEditable ); 285 286 @JsProperty 287 public native String getContextMenu(); 288 289 @JsOverlay 290 @Nonnull 291 public final T contextMenu( String contextMenu ) 292 { 293 setContextMenu( contextMenu ); 294 return self(); 295 } 296 297 @JsProperty 298 protected native void setContextMenu( String contextMenu ); 299 300 @JsProperty 301 public native boolean isControls(); 302 303 @JsProperty 304 protected native void setControls( boolean controls ); 305 306 @JsProperty 307 public native String getCoords(); 308 309 @JsProperty 310 protected native void setCoords( String coords ); 311 312 @JsProperty 313 public native String getCrossOrigin(); 314 315 @JsProperty 316 protected native void setCrossOrigin( String crossOrigin ); 317 318 @JsProperty 319 public native String getData(); 320 321 @JsProperty 322 protected native void setData( String data ); 323 324 @JsProperty 325 public native String getDateTime(); 326 327 @JsProperty 328 protected native void setDateTime( String dateTime ); 329 330 //@JsProperty public native boolean is_default(); 331 //@JsProperty protected native void set_default(boolean _default); 332 333 @JsProperty 334 public native boolean isDefer(); 335 336 @JsProperty 337 protected native void setDefer( boolean defer ); 338 339 @JsProperty 340 public native String getDir(); 341 342 @JsOverlay 343 @Nonnull 344 public final T dir( String dir ) 345 { 346 setDir( dir ); 347 return self(); 348 } 349 350 @JsProperty 351 protected native void setDir( String dir ); 352 353 @JsProperty 354 public native boolean isDisabled(); 355 356 @JsProperty 357 protected native void setDisabled( boolean disabled ); 358 359 @JsProperty 360 public native String getDownload(); 361 362 @JsProperty 363 protected native void setDownload( String download ); 364 365 @JsProperty 366 public native boolean isDraggable(); 367 368 @JsOverlay 369 @Nonnull 370 public final T draggable( boolean draggable ) 371 { 372 setDraggable( draggable ); 373 return self(); 374 } 375 376 @JsProperty 377 protected native void setDraggable( boolean draggable ); 378 379 @JsProperty 380 public native String getEncType(); 381 382 @JsProperty 383 protected native void setEncType( String encType ); 384 385 @JsProperty 386 public native String getForm(); 387 388 @JsProperty 389 protected native void setForm( String form ); 390 391 @JsProperty 392 public native String getFormAction(); 393 394 @JsProperty 395 protected native void setFormAction( String formAction ); 396 397 @JsProperty 398 public native String getFormEncType(); 399 400 @JsProperty 401 protected native void setFormEncType( String formEncType ); 402 403 @JsProperty 404 public native String getFormMethod(); 405 406 @JsProperty 407 protected native void setFormMethod( String formMethod ); 408 409 @JsProperty 410 public native boolean isFormNoValidate(); 411 412 @JsProperty 413 protected native void setFormNoValidate( boolean formNoValidate ); 414 415 @JsProperty 416 public native String getFormTarget(); 417 418 @JsProperty 419 protected native void setFormTarget( String formTarget ); 420 421 @JsProperty 422 public native String getFrameBorder(); 423 424 @JsProperty 425 protected native void setFrameBorder( String frameBorder ); 426 427 @JsProperty 428 public native String getHeaders(); 429 430 @JsProperty 431 protected native void setHeaders( String headers ); 432 433 @JsProperty 434 public native String getHeight(); 435 436 @JsProperty 437 protected native void setHeight( String height ); 438 439 @JsProperty 440 public native boolean isHidden(); 441 442 @JsOverlay 443 @Nonnull 444 public final T hidden( boolean hidden ) 445 { 446 setHidden( hidden ); 447 return self(); 448 } 449 450 @JsProperty 451 protected native void setHidden( boolean hidden ); 452 453 @JsProperty 454 public native int getHigh(); 455 456 @JsProperty 457 protected native void setHigh( int high ); 458 459 @JsProperty 460 public native String getHref(); 461 462 @JsProperty 463 protected native void setHref( String href ); 464 465 @JsProperty 466 public native String getHrefLang(); 467 468 @JsProperty 469 protected native void setHrefLang( String hrefLang ); 470 471 @JsProperty 472 public native String getHtmlFor(); 473 474 @JsProperty 475 protected native void setHtmlFor( String htmlFor ); 476 477 @JsProperty 478 public native String getHttpEquiv(); 479 480 @JsProperty 481 protected native void setHttpEquiv( String httpEquiv ); 482 483 @JsProperty 484 public native String getIcon(); 485 486 @JsProperty 487 protected native void setIcon( String icon ); 488 489 @JsProperty 490 public native String getId(); 491 492 @JsOverlay 493 @Nonnull 494 public final T id( String id ) 495 { 496 setId( id ); 497 return self(); 498 } 499 500 @JsProperty 501 protected native void setId( String id ); 502 503 @JsProperty 504 public native String getInputMode(); 505 506 @JsProperty 507 protected native void setInputMode( String inputMode ); 508 509 @JsProperty 510 public native String getIntegrity(); 511 512 @JsProperty 513 protected native void setIntegrity( String integrity ); 514 515 @JsProperty 516 public native String getIs(); 517 518 @JsProperty 519 protected native void setIs( String is ); 520 521 @JsProperty 522 public native String getKeyParams(); 523 524 @JsProperty 525 protected native void setKeyParams( String keyParams ); 526 527 @JsProperty 528 public native String getKeyType(); 529 530 @JsProperty 531 protected native void setKeyType( String keyType ); 532 533 @JsProperty 534 public native String getKind(); 535 536 @JsProperty 537 protected native void setKind( String kind ); 538 539 @JsProperty 540 public native String getLabel(); 541 542 @JsProperty 543 protected native void setLabel( String label ); 544 545 @JsProperty 546 public native String getLang(); 547 548 @JsOverlay 549 @Nonnull 550 public final T lang( String lang ) 551 { 552 setLang( lang ); 553 return self(); 554 } 555 556 @JsProperty 557 protected native void setLang( String lang ); 558 559 @JsProperty 560 public native String getList(); 561 562 @JsProperty 563 protected native void setList( String list ); 564 565 @JsProperty 566 public native boolean isLoop(); 567 568 @JsProperty 569 protected native void setLoop( boolean loop ); 570 571 @JsProperty 572 public native int getLow(); 573 574 @JsProperty 575 protected native void setLow( int low ); 576 577 @JsProperty 578 public native String getManifest(); 579 580 @JsProperty 581 protected native void setManifest( String manifest ); 582 583 @JsProperty 584 public native int getMarginHeight(); 585 586 @JsProperty 587 protected native void setMarginHeight( int marginHeight ); 588 589 @JsProperty 590 public native int getMarginWidth(); 591 592 @JsProperty 593 protected native void setMarginWidth( int marginWidth ); 594 595 @JsProperty 596 public native String getMax(); 597 598 @JsProperty 599 protected native void setMax( String max ); 600 601 @JsProperty 602 public native int getMaxLength(); 603 604 @JsProperty 605 protected native void setMaxLength( int maxLength ); 606 607 @JsProperty 608 public native String getMedia(); 609 610 @JsProperty 611 protected native void setMedia( String media ); 612 613 @JsProperty 614 public native String getMediaGroup(); 615 616 @JsProperty 617 protected native void setMediaGroup( String mediaGroup ); 618 619 @JsProperty 620 public native String getMethod(); 621 622 @JsProperty 623 protected native void setMethod( String method ); 624 625 @JsProperty 626 public native String getMin(); 627 628 @JsProperty 629 protected native void setMin( String min ); 630 631 @JsProperty 632 public native int getMinLength(); 633 634 @JsProperty 635 protected native void setMinLength( int minLength ); 636 637 @JsProperty 638 public native boolean isMultiple(); 639 640 @JsProperty 641 protected native void setMultiple( boolean multiple ); 642 643 @JsProperty 644 public native boolean isMuted(); 645 646 @JsProperty 647 protected native void setMuted( boolean muted ); 648 649 @JsProperty 650 public native String getName(); 651 652 @JsProperty 653 protected native void setName( String name ); 654 655 @JsProperty 656 public native boolean isNoValidate(); 657 658 @JsProperty 659 protected native void setNoValidate( boolean noValidate ); 660 661 @JsProperty 662 public native boolean isOpen(); 663 664 @JsProperty 665 protected native void setOpen( boolean open ); 666 667 @JsProperty 668 public native int getOptimum(); 669 670 @JsProperty 671 protected native void setOptimum( int optimum ); 672 673 @JsProperty 674 public native String getPattern(); 675 676 @JsProperty 677 protected native void setPattern( String pattern ); 678 679 @JsProperty 680 public native String getPlaceholder(); 681 682 @JsProperty 683 protected native void setPlaceholder( String placeholder ); 684 685 @JsProperty 686 public native String getPoster(); 687 688 @JsProperty 689 protected native void setPoster( String poster ); 690 691 @JsProperty 692 public native String getPreload(); 693 694 @JsProperty 695 protected native void setPreload( String preload ); 696 697 @JsProperty 698 public native String getRadioGroup(); 699 700 @JsProperty 701 protected native void setRadioGroup( String radioGroup ); 702 703 @JsProperty 704 public native boolean isReadOnly(); 705 706 @JsProperty 707 protected native void setReadOnly( boolean readOnly ); 708 709 @JsProperty 710 public native String getRel(); 711 712 @JsProperty 713 protected native void setRel( String rel ); 714 715 @JsProperty 716 public native String getReferrerPolicy(); 717 718 @JsProperty 719 protected native void setReferrerPolicy( String rel ); 720 721 @JsProperty 722 public native boolean isRequired(); 723 724 @JsProperty 725 protected native void setRequired( boolean required ); 726 727 @JsProperty 728 public native String getRole(); 729 730 @JsProperty 731 protected native void setRole( String role ); 732 733 @JsProperty 734 public native int getRows(); 735 736 @JsProperty 737 protected native void setRows( int rows ); 738 739 @JsProperty 740 public native int getRowSpan(); 741 742 @JsProperty 743 protected native void setRowSpan( int rowSpan ); 744 745 @JsProperty 746 public native String getSandbox(); 747 748 @JsProperty 749 protected native void setSandbox( String sandbox ); 750 751 @JsProperty 752 public native String getScope(); 753 754 @JsProperty 755 protected native void setScope( String scope ); 756 757 @JsProperty 758 public native boolean isScoped(); 759 760 @JsProperty 761 protected native void setScoped( boolean scoped ); 762 763 @JsProperty 764 public native String getScrolling(); 765 766 @JsProperty 767 protected native void setScrolling( String scrolling ); 768 769 @JsProperty 770 public native boolean isSeamless(); 771 772 @JsProperty 773 protected native void setSeamless( boolean seamless ); 774 775 @JsProperty 776 public native boolean isSelected(); 777 778 @JsProperty 779 protected native void setSelected( boolean selected ); 780 781 @JsProperty 782 public native String getShape(); 783 784 @JsProperty 785 protected native void setShape( String shape ); 786 787 @JsProperty 788 public native int getSize(); 789 790 @JsProperty 791 protected native void setSize( int size ); 792 793 @JsProperty 794 public native String getSizes(); 795 796 @JsProperty 797 protected native void setSizes( String sizes ); 798 799 @JsProperty 800 public native int getSpan(); 801 802 @JsProperty 803 protected native void setSpan( int span ); 804 805 @JsProperty 806 public native boolean isSpellCheck(); 807 808 @JsOverlay 809 @Nonnull 810 public final T spellCheck( boolean spellCheck ) 811 { 812 setSpellCheck( spellCheck ); 813 return self(); 814 } 815 816 @JsProperty 817 protected native void setSpellCheck( boolean spellCheck ); 818 819 @JsProperty 820 public native String getSrc(); 821 822 @JsProperty 823 protected native void setSrc( String src ); 824 825 @JsProperty 826 public native String getSrcDoc(); 827 828 @JsProperty 829 protected native void setSrcDoc( String srcDoc ); 830 831 @JsProperty 832 public native String getSrcLang(); 833 834 @JsProperty 835 protected native void setSrcLang( String srcLang ); 836 837 @JsProperty 838 public native String getSrcSet(); 839 840 @JsProperty 841 protected native void setSrcSet( String srcSet ); 842 843 @JsProperty 844 public native int getStart(); 845 846 @JsProperty 847 protected native void setStart( int start ); 848 849 @JsProperty 850 public native String getStep(); 851 852 @JsProperty 853 protected native void setStep( String step ); 854 855 @JsProperty 856 public native CssProps getStyle(); 857 858 @JsOverlay 859 @Nonnull 860 public final T style( CssProps style ) 861 { 862 setStyle( style ); 863 return self(); 864 } 865 866 @JsProperty 867 protected native void setStyle( CssProps style ); 868 869 @JsProperty 870 public native String getSummary(); 871 872 @JsProperty 873 protected native void setSummary( String summary ); 874 875 @JsProperty 876 public native int getTabIndex(); 877 878 @JsOverlay 879 @Nonnull 880 public final T tabIndex( int tabIndex ) 881 { 882 setTabIndex( tabIndex ); 883 return self(); 884 } 885 886 @JsProperty 887 protected native void setTabIndex( int tabIndex ); 888 889 @JsProperty 890 public native String getTarget(); 891 892 @JsProperty 893 protected native void setTarget( String target ); 894 895 @JsProperty 896 public native String getTitle(); 897 898 @JsOverlay 899 @Nonnull 900 public final T title( String title ) 901 { 902 setTitle( title ); 903 return self(); 904 } 905 906 @JsProperty 907 protected native void setTitle( String title ); 908 909 @JsProperty 910 public native String getType(); 911 912 @JsProperty 913 protected native void setType( @Nonnull @InputType String type ); 914 915 @JsProperty 916 public native String getTranslate(); 917 918 @JsOverlay 919 @Nonnull 920 public final T translate( @Nonnull @YesNo final String s ) 921 { 922 setTranslate( s ); 923 return self(); 924 } 925 926 @JsProperty 927 protected native void setTranslate( String translate ); 928 929 @JsProperty 930 public native String getUseMap(); 931 932 @JsProperty 933 protected native void setUseMap( String useMap ); 934 935 @JsProperty 936 public native String getValue(); 937 938 @JsProperty 939 protected native void setValue( String value ); 940 941 @JsProperty 942 public native String getWidth(); 943 944 @JsProperty 945 protected native void setWidth( String width ); 946 947 @JsProperty 948 public native String getWmode(); 949 950 @JsProperty 951 protected native void setWmode( String wmode ); 952 953 @JsProperty 954 public native String getWrap(); 955 956 @JsProperty 957 protected native void setWrap( String wrap ); 958 959 // RDFa Attributes 960 961 @JsProperty 962 public native String getAbout(); 963 964 @JsProperty 965 protected native void setAbout( String about ); 966 967 @JsProperty 968 public native String getDatatype(); 969 970 @JsProperty 971 protected native void setDatatype( String datatype ); 972 973 @JsProperty 974 public native String getInlist(); 975 976 @JsProperty 977 protected native void setInlist( String inlist ); 978 979 @JsProperty 980 public native String getPrefix(); 981 982 @JsProperty 983 protected native void setPrefix( String prefix ); 984 985 @JsProperty 986 public native String getProperty(); 987 988 @JsProperty 989 protected native void setProperty( String property ); 990 991 @JsProperty 992 public native String getResource(); 993 994 @JsProperty 995 protected native void setResource( String resource ); 996 997 @JsProperty 998 public native String getTypeof(); 999 1000 @JsProperty 1001 protected native void setTypeof( String typeof ); 1002 1003 @JsProperty 1004 public native String getVocab(); 1005 1006 @JsProperty 1007 protected native void setVocab( String vocab ); 1008 1009 // Non-standard Attributes 1010 1011 @JsProperty 1012 public native String getAutoCapitalize(); 1013 1014 @JsProperty 1015 protected native void setAutoCapitalize( String autoCapitalize ); 1016 1017 @JsProperty 1018 public native String getAutoCorrect(); 1019 1020 @JsProperty 1021 protected native void setAutoCorrect( String autoCorrect ); 1022 1023 @JsProperty 1024 public native String getAutoSave(); 1025 1026 @JsProperty 1027 protected native void setAutoSave( String autoSave ); 1028 1029 @JsProperty 1030 public native String getColor(); 1031 1032 @JsProperty 1033 protected native void setColor( String color ); 1034 1035 @JsProperty 1036 public native String getItemProp(); 1037 1038 @JsProperty 1039 protected native void setItemProp( String itemProp ); 1040 1041 @JsProperty 1042 public native boolean isItemScope(); 1043 1044 @JsProperty 1045 protected native void setItemScope( boolean itemScope ); 1046 1047 @JsProperty 1048 public native String getItemType(); 1049 1050 @JsProperty 1051 protected native void setItemType( String itemType ); 1052 1053 @JsProperty 1054 public native String getItemID(); 1055 1056 @JsProperty 1057 protected native void setItemID( String itemID ); 1058 1059 @JsProperty 1060 public native String getItemRef(); 1061 1062 @JsProperty 1063 protected native void setItemRef( String itemRef ); 1064 1065 @JsProperty 1066 public native int getResults(); 1067 1068 @JsProperty 1069 protected native void setResults( int results ); 1070 1071 @JsProperty 1072 public native String getSecurity(); 1073 1074 @JsProperty 1075 protected native void setSecurity( String security ); 1076 1077 @JsProperty 1078 public native boolean isUnselectable(); 1079 1080 @JsProperty 1081 protected native void setUnselectable( boolean unselectable ); 1082 1083 @JsProperty 1084 @Nullable 1085 public native ReactEventHandler getOnAnimationStart(); 1086 1087 @JsOverlay 1088 @Nonnull 1089 public final T onAnimationStart( @Nullable final ReactEventHandler handler ) 1090 { 1091 setOnAnimationStart( handler ); 1092 return self(); 1093 } 1094 1095 @JsProperty 1096 protected native void setOnAnimationStart( @Nullable final ReactEventHandler onCopy ); 1097 1098 @JsProperty 1099 @Nullable 1100 public native ReactEventHandler getOnAnimationEnd(); 1101 1102 @JsOverlay 1103 @Nonnull 1104 public final T onAnimationEnd( @Nullable final ReactEventHandler handler ) 1105 { 1106 setOnAnimationEnd( handler ); 1107 return self(); 1108 } 1109 1110 @JsProperty 1111 protected native void setOnAnimationEnd( @Nullable final ReactEventHandler onCopy ); 1112 1113 @JsProperty 1114 @Nullable 1115 public native ReactEventHandler getOnAnimationIteration(); 1116 1117 @JsOverlay 1118 @Nonnull 1119 public final T onAnimationIteration( @Nullable final ReactEventHandler handler ) 1120 { 1121 setOnAnimationIteration( handler ); 1122 return self(); 1123 } 1124 1125 @JsProperty 1126 protected native void setOnAnimationIteration( @Nullable final ReactEventHandler onCopy ); 1127 1128 // Clipboard Events 1129 1130 @JsProperty 1131 @Nullable 1132 public native ClipboardEventHandler getOnCopy(); 1133 1134 @JsProperty 1135 protected native void setOnCopy( @Nullable final ClipboardEventHandler onCopy ); 1136 1137 @JsProperty 1138 @Nullable 1139 public native ClipboardEventHandler getOnCut(); 1140 1141 @JsProperty 1142 protected native void setOnCut( @Nullable final ClipboardEventHandler onCut ); 1143 1144 @JsProperty 1145 @Nullable 1146 public native ClipboardEventHandler getOnPaste(); 1147 1148 @JsProperty 1149 protected native void setOnPaste( @Nullable final ClipboardEventHandler onPaste ); 1150 1151 // Composition Events 1152 1153 @JsProperty 1154 @Nullable 1155 public native CompositionEventHandler getOnCompositionEnd(); 1156 1157 @JsProperty 1158 protected native void setOnCompositionEnd( @Nullable final CompositionEventHandler onCompositionEnd ); 1159 1160 @JsProperty 1161 @Nullable 1162 public native CompositionEventHandler getOnCompositionStart(); 1163 1164 @JsProperty 1165 protected native void setOnCompositionStart( @Nullable final CompositionEventHandler onCompositionStart ); 1166 1167 @JsProperty 1168 @Nullable 1169 public native CompositionEventHandler getOnCompositionUpdate(); 1170 1171 @JsProperty 1172 protected native void setOnCompositionUpdate( @Nullable final CompositionEventHandler onCompositionUpdate ); 1173 1174 // Focus Events 1175 1176 @JsProperty 1177 @Nullable 1178 public native FocusEventHandler getOnFocus(); 1179 1180 @JsProperty 1181 protected native void setOnFocus( @Nullable final FocusEventHandler onFocus ); 1182 1183 @JsProperty 1184 @Nullable 1185 public native FocusEventHandler getOnBlur(); 1186 1187 @JsProperty 1188 protected native void setOnBlur( @Nullable final FocusEventHandler onBlur ); 1189 1190 // Form Events 1191 1192 @JsProperty 1193 @Nullable 1194 public native FormEventHandler getOnChange(); 1195 1196 @JsProperty 1197 protected native void setOnChange( @Nullable final FormEventHandler onChange ); 1198 1199 @JsProperty 1200 @Nullable 1201 public native FormEventHandler getOnInput(); 1202 1203 @JsProperty 1204 protected native void setOnInput( @Nullable final FormEventHandler onInput ); 1205 1206 @JsProperty 1207 @Nullable 1208 public native FormEventHandler getOnSubmit(); 1209 1210 @JsProperty 1211 protected native void setOnSubmit( @Nullable final FormEventHandler onSubmit ); 1212 1213 // Image Events 1214 1215 @JsProperty 1216 @Nullable 1217 public native ReactEventHandler getOnLoad(); 1218 1219 @JsProperty 1220 protected native void setOnLoad( @Nullable final ReactEventHandler onLoad ); 1221 1222 @JsProperty 1223 @Nullable 1224 public native ReactEventHandler getOnError(); 1225 1226 @JsProperty 1227 protected native void setOnError( @Nullable final ReactEventHandler onError ); 1228 1229 // Keyboard Events 1230 1231 @JsProperty 1232 @Nullable 1233 public native KeyboardEventHandler getOnKeyDown(); 1234 1235 @JsProperty 1236 protected native void setOnKeyDown( @Nullable final KeyboardEventHandler onKeyDown ); 1237 1238 @JsProperty 1239 @Nullable 1240 public native KeyboardEventHandler getOnKeyPress(); 1241 1242 @JsProperty 1243 protected native void setOnKeyPress( @Nullable final KeyboardEventHandler onKeyPress ); 1244 1245 @JsProperty 1246 @Nullable 1247 public native KeyboardEventHandler getOnKeyUp(); 1248 1249 @JsProperty 1250 protected native void setOnKeyUp( @Nullable final KeyboardEventHandler onKeyUp ); 1251 1252 // Media Events 1253 1254 @JsProperty 1255 @Nullable 1256 public native ReactEventHandler getOnAbort(); 1257 1258 @JsProperty 1259 protected native void setOnAbort( @Nullable final ReactEventHandler onAbort ); 1260 1261 @JsProperty 1262 @Nullable 1263 public native ReactEventHandler getOnCanPlay(); 1264 1265 @JsProperty 1266 protected native void setOnCanPlay( @Nullable final ReactEventHandler onCanPlay ); 1267 1268 @JsProperty 1269 @Nullable 1270 public native ReactEventHandler getOnCanPlayThrough(); 1271 1272 @JsProperty 1273 protected native void setOnCanPlayThrough( @Nullable final ReactEventHandler onCanPlayThrough ); 1274 1275 @JsProperty 1276 @Nullable 1277 public native ReactEventHandler getOnDurationChange(); 1278 1279 @JsProperty 1280 protected native void setOnDurationChange( @Nullable final ReactEventHandler onDurationChange ); 1281 1282 @JsProperty 1283 @Nullable 1284 public native ReactEventHandler getOnEmptied(); 1285 1286 @JsProperty 1287 protected native void setOnEmptied( @Nullable final ReactEventHandler onEmptied ); 1288 1289 @JsProperty 1290 @Nullable 1291 public native ReactEventHandler getOnEncrypted(); 1292 1293 @JsProperty 1294 protected native void setOnEncrypted( @Nullable final ReactEventHandler onEncrypted ); 1295 1296 @JsProperty 1297 @Nullable 1298 public native ReactEventHandler getOnEnded(); 1299 1300 @JsProperty 1301 protected native void setOnEnded( @Nullable final ReactEventHandler onEnded ); 1302 1303 @JsProperty 1304 @Nullable 1305 public native ReactEventHandler getOnLoadedData(); 1306 1307 @JsProperty 1308 protected native void setOnLoadedData( @Nullable final ReactEventHandler onLoadedData ); 1309 1310 @JsProperty 1311 @Nullable 1312 public native ReactEventHandler getOnLoadedMetadata(); 1313 1314 @JsProperty 1315 protected native void setOnLoadedMetadata( @Nullable final ReactEventHandler onLoadedMetadata ); 1316 1317 @JsProperty 1318 @Nullable 1319 public native ReactEventHandler getOnLoadStart(); 1320 1321 @JsProperty 1322 protected native void setOnLoadStart( @Nullable final ReactEventHandler onLoadStart ); 1323 1324 @JsProperty 1325 @Nullable 1326 public native ReactEventHandler getOnPause(); 1327 1328 @JsProperty 1329 protected native void setOnPause( @Nullable final ReactEventHandler onPause ); 1330 1331 @JsProperty 1332 @Nullable 1333 public native ReactEventHandler getOnPlay(); 1334 1335 @JsProperty 1336 protected native void setOnPlay( @Nullable final ReactEventHandler onPlay ); 1337 1338 @JsProperty 1339 @Nullable 1340 public native ReactEventHandler getOnPlaying(); 1341 1342 @JsProperty 1343 protected native void setOnPlaying( @Nullable final ReactEventHandler onPlaying ); 1344 1345 @JsProperty 1346 @Nullable 1347 public native ReactEventHandler getOnProgress(); 1348 1349 @JsProperty 1350 protected native void setOnProgress( @Nullable final ReactEventHandler onProgress ); 1351 1352 @JsProperty 1353 @Nullable 1354 public native ReactEventHandler getOnRateChange(); 1355 1356 @JsProperty 1357 protected native void setOnRateChange( @Nullable final ReactEventHandler onRateChange ); 1358 1359 @JsProperty 1360 @Nullable 1361 public native ReactEventHandler getOnSeeked(); 1362 1363 @JsProperty 1364 protected native void setOnSeeked( @Nullable final ReactEventHandler onSeeked ); 1365 1366 @JsProperty 1367 @Nullable 1368 public native ReactEventHandler getOnSeeking(); 1369 1370 @JsProperty 1371 protected native void setOnSeeking( @Nullable final ReactEventHandler onSeeking ); 1372 1373 @JsProperty 1374 @Nullable 1375 public native ReactEventHandler getOnStalled(); 1376 1377 @JsProperty 1378 protected native void setOnStalled( @Nullable final ReactEventHandler onStalled ); 1379 1380 @JsProperty 1381 @Nullable 1382 public native ReactEventHandler getOnSuspend(); 1383 1384 @JsProperty 1385 protected native void setOnSuspend( @Nullable final ReactEventHandler onSuspend ); 1386 1387 @JsProperty 1388 @Nullable 1389 public native ReactEventHandler getOnTimeUpdate(); 1390 1391 @JsProperty 1392 protected native void setOnTimeUpdate( @Nullable final ReactEventHandler onTimeUpdate ); 1393 1394 @JsProperty 1395 @Nullable 1396 public native ReactEventHandler getOnVolumeChange(); 1397 1398 @JsProperty 1399 protected native void setOnVolumeChange( @Nullable final ReactEventHandler onVolumeChange ); 1400 1401 @JsProperty 1402 @Nullable 1403 public native ReactEventHandler getOnWaiting(); 1404 1405 @JsProperty 1406 protected native void setOnWaiting( @Nullable final ReactEventHandler onWaiting ); 1407 1408 // MouseEvents 1409 1410 @JsProperty 1411 public native MouseEventHandler getOnClick(); 1412 1413 @JsProperty 1414 protected native void setOnClick( @Nullable final MouseEventHandler onClick ); 1415 1416 @JsProperty 1417 @Nullable 1418 public native MouseEventHandler getOnContextMenu(); 1419 1420 @JsProperty 1421 protected native void setOnContextMenu( @Nullable final MouseEventHandler onContextMenu ); 1422 1423 @JsProperty 1424 @Nullable 1425 public native MouseEventHandler getOnDoubleClick(); 1426 1427 @JsProperty 1428 protected native void setOnDoubleClick( @Nullable final MouseEventHandler onDoubleClick ); 1429 1430 @JsProperty 1431 @Nullable 1432 public native DragEventHandler getOnDrag(); 1433 1434 @JsProperty 1435 protected native void setOnDrag( @Nullable final DragEventHandler onDrag ); 1436 1437 @JsProperty 1438 @Nullable 1439 public native DragEventHandler getOnDragEnd(); 1440 1441 @JsProperty 1442 protected native void setOnDragEnd( @Nullable final DragEventHandler onDragEnd ); 1443 1444 @JsProperty 1445 @Nullable 1446 public native DragEventHandler getOnDragEnter(); 1447 1448 @JsProperty 1449 protected native void setOnDragEnter( @Nullable final DragEventHandler onDragEnter ); 1450 1451 @JsProperty 1452 @Nullable 1453 public native DragEventHandler getOnDragExit(); 1454 1455 @JsProperty 1456 protected native void setOnDragExit( @Nullable final DragEventHandler onDragExit ); 1457 1458 @JsProperty 1459 @Nullable 1460 public native DragEventHandler getOnDragLeave(); 1461 1462 @JsProperty 1463 protected native void setOnDragLeave( @Nullable final DragEventHandler onDragLeave ); 1464 1465 @JsProperty 1466 @Nullable 1467 public native DragEventHandler getOnDragOver(); 1468 1469 @JsProperty 1470 protected native void setOnDragOver( @Nullable final DragEventHandler onDragOver ); 1471 1472 @JsProperty 1473 @Nullable 1474 public native DragEventHandler getOnDragStart(); 1475 1476 @JsProperty 1477 protected native void setOnDragStart( @Nullable final DragEventHandler onDragStart ); 1478 1479 @JsProperty 1480 @Nullable 1481 public native DragEventHandler getOnDrop(); 1482 1483 @JsProperty 1484 protected native void setOnDrop( @Nullable final DragEventHandler onDrop ); 1485 1486 @JsProperty 1487 @Nullable 1488 public native MouseEventHandler getOnMouseDown(); 1489 1490 @JsProperty 1491 protected native void setOnMouseDown( @Nullable final MouseEventHandler onMouseDown ); 1492 1493 @JsProperty 1494 @Nullable 1495 public native MouseEventHandler getOnMouseEnter(); 1496 1497 @JsProperty 1498 protected native void setOnMouseEnter( @Nullable final MouseEventHandler onMouseEnter ); 1499 1500 @JsProperty 1501 @Nullable 1502 public native MouseEventHandler getOnMouseLeave(); 1503 1504 @JsProperty 1505 protected native void setOnMouseLeave( @Nullable final MouseEventHandler onMouseLeave ); 1506 1507 @JsProperty 1508 @Nullable 1509 public native MouseEventHandler getOnMouseMove(); 1510 1511 @JsProperty 1512 protected native void setOnMouseMove( @Nullable final MouseEventHandler onMouseMove ); 1513 1514 @JsProperty 1515 @Nullable 1516 public native MouseEventHandler getOnMouseOut(); 1517 1518 @JsProperty 1519 protected native void setOnMouseOut( @Nullable final MouseEventHandler onMouseOut ); 1520 1521 @JsProperty 1522 @Nullable 1523 public native MouseEventHandler getOnMouseOver(); 1524 1525 @JsProperty 1526 protected native void setOnMouseOver( @Nullable final MouseEventHandler onMouseOver ); 1527 1528 @JsProperty 1529 @Nullable 1530 public native MouseEventHandler getOnMouseUp(); 1531 1532 @JsProperty 1533 protected native void setOnMouseUp( @Nullable final MouseEventHandler onMouseUp ); 1534 1535 // Selection Events 1536 1537 @JsProperty 1538 @Nullable 1539 public native ReactEventHandler getOnSelect(); 1540 1541 @JsProperty 1542 protected native void setOnSelect( @Nullable final ReactEventHandler onSelect ); 1543 1544 // Touch Events 1545 1546 @JsProperty 1547 @Nullable 1548 public native TouchEventHandler getOnTouchCancel(); 1549 1550 @JsProperty 1551 protected native void setOnTouchCancel( @Nullable final TouchEventHandler onTouchCancel ); 1552 1553 @JsProperty 1554 @Nullable 1555 public native TouchEventHandler getOnTouchEnd(); 1556 1557 @JsProperty 1558 protected native void setOnTouchEnd( @Nullable final TouchEventHandler onTouchEnd ); 1559 1560 @JsProperty 1561 @Nullable 1562 public native TouchEventHandler getOnTouchMove(); 1563 1564 @JsProperty 1565 protected native void setOnTouchMove( @Nullable final TouchEventHandler onTouchMove ); 1566 1567 @JsProperty 1568 @Nullable 1569 public native TouchEventHandler getOnTouchStart(); 1570 1571 @JsProperty 1572 protected native void setOnTouchStart( @Nullable final TouchEventHandler onTouchStart ); 1573 1574 // UI Events 1575 @JsProperty 1576 @Nullable 1577 public native UIEventHandler getOnScroll(); 1578 1579 @JsProperty 1580 protected native void setOnScroll( @Nullable final UIEventHandler onScroll ); 1581 1582 // Wheel Events 1583 @JsProperty 1584 @Nullable 1585 public native WheelEventHandler getOnWheel(); 1586 1587 @JsProperty 1588 protected native void setOnWheel( WheelEventHandler onWheel ); 1589 1590 @JsOverlay 1591 @Nonnull 1592 public final T onWheel( @Nullable final WheelEventHandler onWheel ) 1593 { 1594 setOnWheel( onWheel ); 1595 return self(); 1596 } 1597 1598 @JsOverlay 1599 @Nonnull 1600 protected final T self() 1601 { 1602 return Js.uncheckedCast( this ); 1603 } 1604}