1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:07:34 +00:00

LibWeb: Add missing constructors to HTMLElement IDLs

This commit is contained in:
Srikavin Ramkumar 2023-03-23 03:48:52 -04:00 committed by Andreas Kling
parent daf421846c
commit 5c8be3b072
70 changed files with 132 additions and 12 deletions

View file

@ -4,7 +4,8 @@
// https://html.spec.whatwg.org/multipage/text-level-semantics.html#htmlanchorelement
[Exposed=Window]
interface HTMLAnchorElement : HTMLElement {
// FIXME: [HTMLConstructor] constructor();
[HTMLConstructor] constructor();
[Reflect] attribute DOMString target;
[Reflect] attribute DOMString download;
@ -20,6 +21,7 @@ interface HTMLAnchorElement : HTMLElement {
[Reflect] attribute DOMString name;
[Reflect] attribute DOMString rev;
[Reflect] attribute DOMString shape;
};
HTMLAnchorElement includes HTMLHyperlinkElementUtils;

View file

@ -4,7 +4,8 @@
// https://html.spec.whatwg.org/multipage/image-maps.html#htmlareaelement
[Exposed=Window]
interface HTMLAreaElement : HTMLElement {
// FIXME: [HTMLConstructor] constructor();
[HTMLConstructor] constructor();
// FIXME: [CEReactions] attribute DOMString alt;
// FIXME: [CEReactions] attribute DOMString coords;
@ -18,6 +19,7 @@ interface HTMLAreaElement : HTMLElement {
// Obsolete
[Reflect=nohref] attribute boolean noHref;
};
HTMLAreaElement includes HTMLHyperlinkElementUtils;

View file

@ -2,5 +2,5 @@
[Exposed=Window, LegacyFactoryFunction=Audio(optional DOMString src)]
interface HTMLAudioElement : HTMLMediaElement {
// FIXME: [HTMLConstructor] constructor();
[HTMLConstructor] constructor();
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLBRElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString clear;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLBaseElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString href;
[Reflect] attribute DOMString target;

View file

@ -5,6 +5,8 @@
[Exposed=Window]
interface HTMLBodyElement : HTMLElement {
[HTMLConstructor] constructor();
[LegacyNullToEmptyString, Reflect] attribute DOMString text;
[LegacyNullToEmptyString, Reflect] attribute DOMString link;
[LegacyNullToEmptyString, Reflect=vlink] attribute DOMString vLink;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLButtonElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect=formnovalidate] attribute boolean formNoValidate;
[Reflect=formtarget] attribute DOMString formTarget;
[Reflect] attribute DOMString name;

View file

@ -8,6 +8,8 @@ typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext;
[Exposed=Window]
interface HTMLCanvasElement : HTMLElement {
[HTMLConstructor] constructor();
RenderingContext? getContext(DOMString contextId, optional any options = null);
attribute unsigned long width;
attribute unsigned long height;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLDListElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute boolean compact;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLDataElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString value;
};

View file

@ -4,6 +4,6 @@
[Exposed=Window]
interface HTMLDataListElement : HTMLElement {
[HTMLConstructor] constructor();
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLDetailsElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute boolean open;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLDialogElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute boolean open;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLDirectoryElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute boolean compact;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLDivElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString align;
};

View file

@ -6,6 +6,8 @@
[Exposed=Window]
interface HTMLElement : Element {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString title;
[Reflect] attribute DOMString lang;
attribute DOMString dir;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLEmbedElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString src;
[Reflect] attribute DOMString type;
[Reflect] attribute DOMString width;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLFieldSetElement : HTMLElement {
[HTMLConstructor] constructor();
readonly attribute DOMString type;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLFontElement : HTMLElement {
[HTMLConstructor] constructor();
[LegacyNullToEmptyString, Reflect] attribute DOMString color;
[Reflect] attribute DOMString face;
[Reflect] attribute DOMString size;

View file

@ -5,6 +5,8 @@
[Exposed=Window]
interface HTMLFormElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString name;
[Reflect] attribute DOMString rel;
[Reflect=accept-charset] attribute DOMString acceptCharset;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLFrameElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString name;
[Reflect] attribute DOMString scrolling;
[Reflect] attribute DOMString src;

View file

@ -5,6 +5,8 @@
[Exposed=Window]
interface HTMLFrameSetElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString cols;
[Reflect] attribute DOMString rows;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLHRElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString align;
[Reflect] attribute DOMString color;
[Reflect=noshade] attribute boolean noShade;

View file

@ -4,6 +4,6 @@
[Exposed=Window]
interface HTMLHeadElement : HTMLElement {
[HTMLConstructor] constructor();
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLHeadingElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString align;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLHtmlElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString version;
};

View file

@ -5,6 +5,8 @@
[Exposed=Window]
interface HTMLIFrameElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString src;
[Reflect] attribute DOMString srcdoc;
[Reflect] attribute DOMString name;

View file

@ -4,6 +4,8 @@
[Exposed=Window, LegacyFactoryFunction=Image(optional unsigned long width, optional unsigned long height)]
interface HTMLImageElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString src;
[Reflect] attribute DOMString alt;
[Reflect] attribute DOMString srcset;

View file

@ -6,6 +6,8 @@
[Exposed=Window]
interface HTMLInputElement : HTMLElement {
[HTMLConstructor] constructor();
readonly attribute HTMLFormElement? form;
attribute FileList? files;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLLIElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString type;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLLabelElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect=for] attribute DOMString htmlFor;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLLegendElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString align;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLLinkElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString href;
[Reflect] attribute DOMString hreflang;
[Reflect] attribute DOMString integrity;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLMapElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString name;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLMarqueeElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString behavior;
[Reflect=bgcolor] attribute DOMString bgColor;
[Reflect] attribute DOMString direction;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLMenuElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute boolean compact;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLMetaElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString name;
[Reflect] attribute DOMString content;
[Reflect=http-equiv] attribute DOMString httpEquiv;

View file

@ -4,6 +4,6 @@
[Exposed=Window]
interface HTMLMeterElement : HTMLElement {
[HTMLConstructor] constructor();
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLModElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute USVString cite;
[Reflect=datetime] attribute DOMString dateTime;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLOListElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute boolean reversed;
[Reflect] attribute DOMString type;

View file

@ -5,6 +5,8 @@
[Exposed=Window]
interface HTMLObjectElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString data;
[Reflect] attribute DOMString type;
[Reflect] attribute DOMString name;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLOptGroupElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute boolean disabled;
[Reflect] attribute DOMString label;

View file

@ -4,6 +4,8 @@
[Exposed=Window, LegacyFactoryFunction=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false)]
interface HTMLOptionElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute boolean disabled;
[Reflect=selected] attribute boolean defaultSelected;
attribute boolean selected;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLOutputElement : HTMLElement {
[HTMLConstructor] constructor();
readonly attribute DOMString type;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLParagraphElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString align;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLParamElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString name;
[Reflect] attribute DOMString value;

View file

@ -4,6 +4,6 @@
[Exposed=Window]
interface HTMLPictureElement : HTMLElement {
[HTMLConstructor] constructor();
};

View file

@ -4,6 +4,6 @@
[Exposed=Window]
interface HTMLPreElement : HTMLElement {
[HTMLConstructor] constructor();
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLProgressElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute double value;
[CEReactions] attribute double max;
readonly attribute double position;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLQuoteElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString cite;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLScriptElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString src;
[Reflect] attribute DOMString type;
[Reflect=nomodule] attribute boolean noModule;

View file

@ -5,6 +5,8 @@
[Exposed=Window]
interface HTMLSelectElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute boolean disabled;
[Reflect] attribute boolean multiple;
[Reflect] attribute boolean required;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLSlotElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString name;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLSourceElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString src;
[Reflect] attribute DOMString type;
[Reflect] attribute DOMString srcset;

View file

@ -4,6 +4,6 @@
[Exposed=Window]
interface HTMLSpanElement : HTMLElement {
[HTMLConstructor] constructor();
};

View file

@ -5,7 +5,7 @@
// https://html.spec.whatwg.org/multipage/semantics.html#htmlstyleelement
[Exposed=Window]
interface HTMLStyleElement : HTMLElement {
// FIXME: [HTMLConstructor] constructor();
[HTMLConstructor] constructor();
// FIXME: attribute boolean disabled;
[Reflect] attribute DOMString media;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLTableCaptionElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString align;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLTableCellElement : HTMLElement {
[HTMLConstructor] constructor();
attribute unsigned long colSpan;
attribute unsigned long rowSpan;
[Reflect] attribute DOMString headers;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLTableColElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString align;
[Reflect=char] attribute DOMString ch;
[Reflect=charoff] attribute DOMString chOff;

View file

@ -8,6 +8,8 @@
[Exposed=Window]
interface HTMLTableElement : HTMLElement {
[HTMLConstructor] constructor();
attribute HTMLTableCaptionElement? caption;
HTMLTableCaptionElement createCaption();
undefined deleteCaption();

View file

@ -6,6 +6,8 @@
[Exposed=Window]
interface HTMLTableRowElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString align;
[Reflect=char] attribute DOMString ch;
[Reflect=charoff] attribute DOMString chOff;

View file

@ -6,6 +6,8 @@
[Exposed=Window]
interface HTMLTableSectionElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString align;
[Reflect=char] attribute DOMString ch;
[Reflect=charoff] attribute DOMString chOff;

View file

@ -5,6 +5,8 @@
[Exposed=Window]
interface HTMLTemplateElement : HTMLElement {
[HTMLConstructor] constructor();
readonly attribute DocumentFragment content;
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLTextAreaElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString placeholder;
[Reflect] attribute DOMString name;
[Reflect] attribute DOMString wrap;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLTimeElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect=datetime] attribute DOMString dateTime;
};

View file

@ -4,6 +4,6 @@
[Exposed=Window]
interface HTMLTitleElement : HTMLElement {
[HTMLConstructor] constructor();
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLTrackElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString src;
[Reflect] attribute DOMString srclang;
[Reflect] attribute DOMString label;

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLUListElement : HTMLElement {
[HTMLConstructor] constructor();
[Reflect] attribute boolean compact;
[Reflect] attribute DOMString type;

View file

@ -4,6 +4,6 @@
[Exposed=Window]
interface HTMLUnknownElement : HTMLElement {
// Note: intentionally no [HTMLConstructor]
};

View file

@ -4,6 +4,8 @@
[Exposed=Window]
interface HTMLVideoElement : HTMLMediaElement {
[HTMLConstructor] constructor();
[Reflect] attribute DOMString poster;
[Reflect=playsinline] attribute boolean playsInline;