2023-03-20 19:31:13 +01:00
|
|
|
#import <CSS/ElementCSSInlineStyle.idl>
|
2022-02-15 22:40:51 +03:30
|
|
|
#import <HTML/DOMStringMap.idl>
|
2024-06-24 21:54:42 +01:00
|
|
|
#import <HTML/ElementInternals.idl>
|
2024-10-29 11:07:02 +01:00
|
|
|
#import <HTML/HTMLOrSVGElement.idl>
|
2023-11-08 11:04:56 -07:00
|
|
|
#import <DOM/Element.idl>
|
2022-03-30 23:35:42 +03:00
|
|
|
#import <DOM/EventHandler.idl>
|
2022-02-15 22:40:51 +03:30
|
|
|
|
2022-10-07 16:45:09 -06:00
|
|
|
// https://html.spec.whatwg.org/multipage/semantics.html#htmlelement
|
2023-09-03 16:42:25 +12:00
|
|
|
[Exposed=Window]
|
2020-06-21 14:35:00 +02:00
|
|
|
interface HTMLElement : Element {
|
|
|
|
|
2023-03-23 03:48:52 -04:00
|
|
|
[HTMLConstructor] constructor();
|
|
|
|
|
2023-10-25 17:26:24 +02:00
|
|
|
// metadata attributes
|
2023-03-01 01:45:18 +00:00
|
|
|
[Reflect, CEReactions] attribute DOMString title;
|
|
|
|
[Reflect, CEReactions] attribute DOMString lang;
|
2025-05-23 22:36:33 +12:00
|
|
|
[CEReactions] attribute boolean translate;
|
2023-03-01 01:45:18 +00:00
|
|
|
[CEReactions] attribute DOMString dir;
|
2020-06-21 14:35:00 +02:00
|
|
|
|
2023-10-25 17:26:24 +02:00
|
|
|
// user interaction
|
2025-01-24 00:53:31 +00:00
|
|
|
[CEReactions] attribute (boolean or unrestricted double or DOMString)? hidden;
|
2024-04-14 17:56:03 +02:00
|
|
|
[Reflect, CEReactions] attribute boolean inert;
|
2022-02-15 00:25:51 +01:00
|
|
|
undefined click();
|
2024-04-14 17:56:03 +02:00
|
|
|
[Reflect=accesskey, CEReactions] attribute DOMString accessKey;
|
2024-04-14 17:55:48 +02:00
|
|
|
readonly attribute DOMString accessKeyLabel;
|
2024-05-19 14:15:49 +01:00
|
|
|
[FIXME, CEReactions] attribute boolean draggable;
|
|
|
|
[FIXME, CEReactions] attribute boolean spellcheck;
|
|
|
|
[FIXME, CEReactions] attribute DOMString autocapitalize;
|
2024-10-18 20:21:56 -07:00
|
|
|
[FIXME, CEReactions] attribute boolean autocorrect;
|
2022-02-15 00:25:51 +01:00
|
|
|
|
2025-07-28 11:29:59 -04:00
|
|
|
[LegacyNullToEmptyString, CEReactions] attribute Utf16DOMString innerText;
|
|
|
|
[LegacyNullToEmptyString, CEReactions] attribute Utf16DOMString outerText;
|
2022-02-06 18:46:26 +01:00
|
|
|
|
2024-06-24 21:54:42 +01:00
|
|
|
ElementInternals attachInternals();
|
2022-10-02 14:42:47 -06:00
|
|
|
|
2023-10-25 17:26:24 +02:00
|
|
|
// The popover API
|
2024-12-05 23:24:24 +00:00
|
|
|
[ImplementedAs=show_popover_for_bindings] undefined showPopover(optional ShowPopoverOptions options = {});
|
|
|
|
[ImplementedAs=hide_popover_for_bindings] undefined hidePopover();
|
|
|
|
boolean togglePopover(optional (TogglePopoverOptions or boolean) options = {});
|
2024-07-01 19:55:33 +01:00
|
|
|
[CEReactions] attribute DOMString? popover;
|
2021-02-03 22:47:50 +01:00
|
|
|
|
2023-10-25 17:26:24 +02:00
|
|
|
// https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface
|
2025-06-17 10:43:45 +01:00
|
|
|
readonly attribute Element? scrollParent;
|
2023-12-10 13:47:16 +01:00
|
|
|
readonly attribute Element? offsetParent;
|
2021-04-15 20:48:55 +03:00
|
|
|
readonly attribute long offsetTop;
|
|
|
|
readonly attribute long offsetLeft;
|
2021-09-30 01:35:19 +02:00
|
|
|
readonly attribute long offsetWidth;
|
|
|
|
readonly attribute long offsetHeight;
|
2023-10-25 17:26:24 +02:00
|
|
|
|
2020-12-09 21:26:42 +00:00
|
|
|
};
|
2022-03-30 23:53:56 +03:00
|
|
|
|
2024-12-05 23:24:24 +00:00
|
|
|
// https://html.spec.whatwg.org/multipage/dom.html#showpopoveroptions
|
|
|
|
dictionary ShowPopoverOptions {
|
|
|
|
HTMLElement source;
|
|
|
|
};
|
|
|
|
|
|
|
|
// https://html.spec.whatwg.org/multipage/dom.html#togglepopoveroptions
|
|
|
|
dictionary TogglePopoverOptions : ShowPopoverOptions {
|
|
|
|
boolean force;
|
|
|
|
};
|
|
|
|
|
2022-04-01 22:00:22 +03:00
|
|
|
HTMLElement includes GlobalEventHandlers;
|
2023-10-25 17:26:24 +02:00
|
|
|
HTMLElement includes ElementContentEditable;
|
2022-03-30 23:53:56 +03:00
|
|
|
HTMLElement includes HTMLOrSVGElement;
|
|
|
|
|
2024-11-26 14:39:53 +00:00
|
|
|
// https://html.spec.whatwg.org/multipage/interaction.html#attr-enterkeyhint
|
|
|
|
enum EnterKeyHint {
|
|
|
|
"enter",
|
|
|
|
"done",
|
|
|
|
"go",
|
|
|
|
"next",
|
|
|
|
"previous",
|
|
|
|
"search",
|
|
|
|
"send"
|
|
|
|
};
|
|
|
|
|
2025-02-04 13:01:46 +01:00
|
|
|
// https://html.spec.whatwg.org/multipage/interaction.html#attr-inputmode
|
2024-11-26 14:34:25 +00:00
|
|
|
enum InputMode {
|
|
|
|
"none",
|
|
|
|
"text",
|
|
|
|
"tel",
|
|
|
|
"url",
|
|
|
|
"email",
|
|
|
|
"numeric",
|
|
|
|
"decimal",
|
|
|
|
"search"
|
|
|
|
};
|
|
|
|
|
2025-02-04 13:01:46 +01:00
|
|
|
// https://html.spec.whatwg.org/multipage/interaction.html#elementcontenteditable
|
2023-10-25 17:26:24 +02:00
|
|
|
interface mixin ElementContentEditable {
|
|
|
|
[CEReactions] attribute DOMString contentEditable;
|
2024-11-26 14:39:53 +00:00
|
|
|
[Reflect=enterkeyhint, Enumerated=EnterKeyHint, CEReactions] attribute DOMString enterKeyHint;
|
2024-02-25 07:00:04 +01:00
|
|
|
readonly attribute boolean isContentEditable;
|
2024-11-26 14:34:25 +00:00
|
|
|
[Reflect=inputmode, Enumerated=InputMode, CEReactions] attribute DOMString inputMode;
|
2023-10-25 17:26:24 +02:00
|
|
|
};
|
|
|
|
|
2023-03-20 19:31:13 +01:00
|
|
|
HTMLElement includes ElementCSSInlineStyle;
|