HTMLElement.idl 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #import <CSS/ElementCSSInlineStyle.idl>
  2. #import <HTML/DOMStringMap.idl>
  3. #import <HTML/ElementInternals.idl>
  4. #import <HTML/HTMLOrSVGElement.idl>
  5. #import <DOM/Element.idl>
  6. #import <DOM/EventHandler.idl>
  7. // https://html.spec.whatwg.org/multipage/semantics.html#htmlelement
  8. [Exposed=Window]
  9. interface HTMLElement : Element {
  10. [HTMLConstructor] constructor();
  11. // metadata attributes
  12. [Reflect, CEReactions] attribute DOMString title;
  13. [Reflect, CEReactions] attribute DOMString lang;
  14. [FIXME, CEReactions] attribute boolean translate;
  15. [CEReactions] attribute DOMString dir;
  16. // user interaction
  17. [Reflect, CEReactions] attribute boolean hidden;
  18. [Reflect, CEReactions] attribute boolean inert;
  19. undefined click();
  20. [Reflect=accesskey, CEReactions] attribute DOMString accessKey;
  21. readonly attribute DOMString accessKeyLabel;
  22. [FIXME, CEReactions] attribute boolean draggable;
  23. [FIXME, CEReactions] attribute boolean spellcheck;
  24. [FIXME, CEReactions] attribute DOMString autocapitalize;
  25. [FIXME, CEReactions] attribute boolean autocorrect;
  26. [LegacyNullToEmptyString, CEReactions] attribute DOMString innerText;
  27. [LegacyNullToEmptyString, CEReactions] attribute DOMString outerText;
  28. ElementInternals attachInternals();
  29. // The popover API
  30. [ImplementedAs=show_popover_for_bindings] undefined showPopover(optional ShowPopoverOptions options = {});
  31. [ImplementedAs=hide_popover_for_bindings] undefined hidePopover();
  32. boolean togglePopover(optional (TogglePopoverOptions or boolean) options = {});
  33. [CEReactions] attribute DOMString? popover;
  34. // https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface
  35. readonly attribute Element? offsetParent;
  36. readonly attribute long offsetTop;
  37. readonly attribute long offsetLeft;
  38. readonly attribute long offsetWidth;
  39. readonly attribute long offsetHeight;
  40. };
  41. // https://html.spec.whatwg.org/multipage/dom.html#showpopoveroptions
  42. dictionary ShowPopoverOptions {
  43. HTMLElement source;
  44. };
  45. // https://html.spec.whatwg.org/multipage/dom.html#togglepopoveroptions
  46. dictionary TogglePopoverOptions : ShowPopoverOptions {
  47. boolean force;
  48. };
  49. HTMLElement includes GlobalEventHandlers;
  50. HTMLElement includes ElementContentEditable;
  51. HTMLElement includes HTMLOrSVGElement;
  52. // https://html.spec.whatwg.org/multipage/interaction.html#attr-enterkeyhint
  53. enum EnterKeyHint {
  54. "enter",
  55. "done",
  56. "go",
  57. "next",
  58. "previous",
  59. "search",
  60. "send"
  61. };
  62. // https://html.spec.whatwg.org/#attr-inputmode
  63. enum InputMode {
  64. "none",
  65. "text",
  66. "tel",
  67. "url",
  68. "email",
  69. "numeric",
  70. "decimal",
  71. "search"
  72. };
  73. // https://html.spec.whatwg.org/#elementcontenteditable
  74. interface mixin ElementContentEditable {
  75. [CEReactions] attribute DOMString contentEditable;
  76. [Reflect=enterkeyhint, Enumerated=EnterKeyHint, CEReactions] attribute DOMString enterKeyHint;
  77. readonly attribute boolean isContentEditable;
  78. [Reflect=inputmode, Enumerated=InputMode, CEReactions] attribute DOMString inputMode;
  79. };
  80. HTMLElement includes ElementCSSInlineStyle;