ladybird/Libraries/LibWeb/HTML/HTMLElement.idl
Sam Atkins af9a227ca3 LibWeb/HTML: Implement HTMLElement.scrollParent
Corresponds to d3effb701c

What a "fixed position container" is isn't clear to me, and we don't
seem to use that elsewhere, so I've left the steps using that as FIXMEs
for now.

There's no test coverage for this in WPT yet and I'm not confident
enough in the specific behaviour to write one myself. So, waiting on
https://github.com/web-platform-tests/wpt/issues/53214
2025-06-17 12:38:27 +01:00

97 lines
3.2 KiB
Text

#import <CSS/ElementCSSInlineStyle.idl>
#import <HTML/DOMStringMap.idl>
#import <HTML/ElementInternals.idl>
#import <HTML/HTMLOrSVGElement.idl>
#import <DOM/Element.idl>
#import <DOM/EventHandler.idl>
// https://html.spec.whatwg.org/multipage/semantics.html#htmlelement
[Exposed=Window]
interface HTMLElement : Element {
[HTMLConstructor] constructor();
// metadata attributes
[Reflect, CEReactions] attribute DOMString title;
[Reflect, CEReactions] attribute DOMString lang;
[CEReactions] attribute boolean translate;
[CEReactions] attribute DOMString dir;
// user interaction
[CEReactions] attribute (boolean or unrestricted double or DOMString)? hidden;
[Reflect, CEReactions] attribute boolean inert;
undefined click();
[Reflect=accesskey, CEReactions] attribute DOMString accessKey;
readonly attribute DOMString accessKeyLabel;
[FIXME, CEReactions] attribute boolean draggable;
[FIXME, CEReactions] attribute boolean spellcheck;
[FIXME, CEReactions] attribute DOMString autocapitalize;
[FIXME, CEReactions] attribute boolean autocorrect;
[LegacyNullToEmptyString, CEReactions] attribute DOMString innerText;
[LegacyNullToEmptyString, CEReactions] attribute DOMString outerText;
ElementInternals attachInternals();
// The popover API
[ImplementedAs=show_popover_for_bindings] undefined showPopover(optional ShowPopoverOptions options = {});
[ImplementedAs=hide_popover_for_bindings] undefined hidePopover();
boolean togglePopover(optional (TogglePopoverOptions or boolean) options = {});
[CEReactions] attribute DOMString? popover;
// https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface
readonly attribute Element? scrollParent;
readonly attribute Element? offsetParent;
readonly attribute long offsetTop;
readonly attribute long offsetLeft;
readonly attribute long offsetWidth;
readonly attribute long offsetHeight;
};
// 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;
};
HTMLElement includes GlobalEventHandlers;
HTMLElement includes ElementContentEditable;
HTMLElement includes HTMLOrSVGElement;
// https://html.spec.whatwg.org/multipage/interaction.html#attr-enterkeyhint
enum EnterKeyHint {
"enter",
"done",
"go",
"next",
"previous",
"search",
"send"
};
// https://html.spec.whatwg.org/multipage/interaction.html#attr-inputmode
enum InputMode {
"none",
"text",
"tel",
"url",
"email",
"numeric",
"decimal",
"search"
};
// https://html.spec.whatwg.org/multipage/interaction.html#elementcontenteditable
interface mixin ElementContentEditable {
[CEReactions] attribute DOMString contentEditable;
[Reflect=enterkeyhint, Enumerated=EnterKeyHint, CEReactions] attribute DOMString enterKeyHint;
readonly attribute boolean isContentEditable;
[Reflect=inputmode, Enumerated=InputMode, CEReactions] attribute DOMString inputMode;
};
HTMLElement includes ElementCSSInlineStyle;