Files
serenity/Userland/Libraries/LibWeb/HTML/HTMLElement.idl
Luke Warlow 47c1b65012 LibWeb: Implement popover property and attribute
The popover property now reflects the attribute.

It cannot currently use the Reflect IDL concept because the empty string
value is special cased.

(cherry picked from commit a9669639cee27e81640fe7a37d9d1f319db6b666;
amended to undo unintentional -- and conflicting -- change to
Tests/LibWeb/rebaseline-libweb-test)
2024-11-01 20:16:58 -04:00

74 lines
2.5 KiB
Plaintext

#import <CSS/ElementCSSInlineStyle.idl>
#import <HTML/DOMStringMap.idl>
#import <HTML/ElementInternals.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;
[FIXME, CEReactions] attribute boolean translate;
[CEReactions] attribute DOMString dir;
// user interaction
[Reflect, CEReactions] attribute boolean 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;
[LegacyNullToEmptyString, CEReactions] attribute DOMString innerText;
[LegacyNullToEmptyString, CEReactions] attribute DOMString outerText;
ElementInternals attachInternals();
// The popover API
[FIXME] undefined showPopover();
[FIXME] undefined hidePopover();
[FIXME] boolean togglePopover(optional boolean force);
[CEReactions] attribute DOMString? popover;
// https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface
readonly attribute Element? offsetParent;
readonly attribute long offsetTop;
readonly attribute long offsetLeft;
readonly attribute long offsetWidth;
readonly attribute long offsetHeight;
};
HTMLElement includes GlobalEventHandlers;
HTMLElement includes ElementContentEditable;
HTMLElement includes HTMLOrSVGElement;
// https://html.spec.whatwg.org/#elementcontenteditable
interface mixin ElementContentEditable {
[CEReactions] attribute DOMString contentEditable;
[FIXME, CEReactions] attribute DOMString enterKeyHint;
readonly attribute boolean isContentEditable;
[FIXME, CEReactions] attribute DOMString inputMode;
};
// https://html.spec.whatwg.org/#htmlorsvgelement
interface mixin HTMLOrSVGElement {
[SameObject] readonly attribute DOMStringMap dataset;
[FIXME] attribute DOMString nonce; // intentionally no [CEReactions]
[CEReactions, Reflect] attribute boolean autofocus;
[CEReactions] attribute long tabIndex;
// FIXME: Support the optional FocusOptions parameter.
undefined focus();
undefined blur();
};
HTMLElement includes ElementCSSInlineStyle;