mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibWeb: Implement popover methods
Implements basics of showPopover, hidePopover and togglePopover.
This commit is contained in:
parent
b17bbe6d1f
commit
eb1c60f37b
Notes:
github-actions[bot]
2024-12-06 12:40:09 +00:00
Author: https://github.com/lukewarlow
Commit: eb1c60f37b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2803
Reviewed-by: https://github.com/tcl3 ✅
12 changed files with 480 additions and 5 deletions
|
@ -34,9 +34,9 @@ interface HTMLElement : Element {
|
|||
ElementInternals attachInternals();
|
||||
|
||||
// The popover API
|
||||
[FIXME] undefined showPopover();
|
||||
[FIXME] undefined hidePopover();
|
||||
[FIXME] boolean togglePopover(optional boolean force);
|
||||
[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
|
||||
|
@ -48,6 +48,16 @@ interface HTMLElement : Element {
|
|||
|
||||
};
|
||||
|
||||
// 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue