HTMLElement.idl 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. [FIXME] undefined showPopover();
  31. [FIXME] undefined hidePopover();
  32. [FIXME] boolean togglePopover(optional boolean force);
  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. HTMLElement includes GlobalEventHandlers;
  42. HTMLElement includes ElementContentEditable;
  43. HTMLElement includes HTMLOrSVGElement;
  44. // https://html.spec.whatwg.org/multipage/interaction.html#attr-enterkeyhint
  45. enum EnterKeyHint {
  46. "enter",
  47. "done",
  48. "go",
  49. "next",
  50. "previous",
  51. "search",
  52. "send"
  53. };
  54. // https://html.spec.whatwg.org/#attr-inputmode
  55. enum InputMode {
  56. "none",
  57. "text",
  58. "tel",
  59. "url",
  60. "email",
  61. "numeric",
  62. "decimal",
  63. "search"
  64. };
  65. // https://html.spec.whatwg.org/#elementcontenteditable
  66. interface mixin ElementContentEditable {
  67. [CEReactions] attribute DOMString contentEditable;
  68. [Reflect=enterkeyhint, Enumerated=EnterKeyHint, CEReactions] attribute DOMString enterKeyHint;
  69. readonly attribute boolean isContentEditable;
  70. [Reflect=inputmode, Enumerated=InputMode, CEReactions] attribute DOMString inputMode;
  71. };
  72. HTMLElement includes ElementCSSInlineStyle;