Add HTMLConstructor attributes where needed

This commit is contained in:
Connor Brewster 2017-06-07 22:53:50 -06:00
parent 0713257add
commit d951dee640
68 changed files with 70 additions and 7 deletions

View file

@ -11,6 +11,7 @@
*/
// https://html.spec.whatwg.org/multipage/#htmlanchorelement
[HTMLConstructor]
interface HTMLAnchorElement : HTMLElement {
attribute DOMString target;
// attribute DOMString download;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlappletelement
// Note: intentionally not [HTMLConstructor]
interface HTMLAppletElement : HTMLElement {
// attribute DOMString align;
// attribute DOMString alt;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlareaelement
[HTMLConstructor]
interface HTMLAreaElement : HTMLElement {
// attribute DOMString alt;
// attribute DOMString coords;

View file

@ -3,5 +3,5 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlaudioelement
//[NamedConstructor=Audio(optional DOMString src)]
[HTMLConstructor/*, NamedConstructor=Audio(optional DOMString src)*/]
interface HTMLAudioElement : HTMLMediaElement {};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlbrelement
[HTMLConstructor]
interface HTMLBRElement : HTMLElement {
// also has obsolete members
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlbaseelement
[HTMLConstructor]
interface HTMLBaseElement : HTMLElement {
attribute DOMString href;
// attribute DOMString target;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#the-body-element
[HTMLConstructor]
interface HTMLBodyElement : HTMLElement {
// also has obsolete members
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlbuttonelement
[HTMLConstructor]
interface HTMLButtonElement : HTMLElement {
// attribute boolean autofocus;
attribute boolean disabled;

View file

@ -5,6 +5,7 @@
// https://html.spec.whatwg.org/multipage/#htmlcanvaselement
typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext;
[HTMLConstructor]
interface HTMLCanvasElement : HTMLElement {
[Pure]
attribute unsigned long width;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmldlistelement
[HTMLConstructor]
interface HTMLDListElement : HTMLElement {
// also has obsolete members
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmldataelement
[HTMLConstructor]
interface HTMLDataElement : HTMLElement {
attribute DOMString value;
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmldatalistelement
[HTMLConstructor]
interface HTMLDataListElement : HTMLElement {
readonly attribute HTMLCollection options;
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmldetailselement
[HTMLConstructor]
interface HTMLDetailsElement : HTMLElement {
attribute boolean open;
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmldialogelement
[HTMLConstructor]
interface HTMLDialogElement : HTMLElement {
attribute boolean open;
attribute DOMString returnValue;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmldirectoryelement
[HTMLConstructor]
interface HTMLDirectoryElement : HTMLElement {
// attribute boolean compact;
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmldivelement
[HTMLConstructor]
interface HTMLDivElement : HTMLElement {
// also has obsolete members
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlelement
[HTMLConstructor]
interface HTMLElement : Element {
// metadata attributes
attribute DOMString title;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlembedelement
[HTMLConstructor]
interface HTMLEmbedElement : HTMLElement {
// attribute DOMString src;
// attribute DOMString type;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlfieldsetelement
[HTMLConstructor]
interface HTMLFieldSetElement : HTMLElement {
attribute boolean disabled;
readonly attribute HTMLFormElement? form;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlfontelement
[HTMLConstructor]
interface HTMLFontElement : HTMLElement {
[TreatNullAs=EmptyString] attribute DOMString color;
attribute DOMString face;

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlformelement
//[OverrideBuiltins]
[/*OverrideBuiltins, */HTMLConstructor]
interface HTMLFormElement : HTMLElement {
attribute DOMString acceptCharset;
attribute DOMString action;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlframeelement
[HTMLConstructor]
interface HTMLFrameElement : HTMLElement {
// attribute DOMString name;
// attribute DOMString scrolling;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlframesetelement
[HTMLConstructor]
interface HTMLFrameSetElement : HTMLElement {
// attribute DOMString cols;
// attribute DOMString rows;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlhrelement
[HTMLConstructor]
interface HTMLHRElement : HTMLElement {
// also has obsolete members
};

View file

@ -3,4 +3,5 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlheadelement
[HTMLConstructor]
interface HTMLHeadElement : HTMLElement {};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlheadingelement
[HTMLConstructor]
interface HTMLHeadingElement : HTMLElement {
// also has obsolete members
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlhtmlelement
[HTMLConstructor]
interface HTMLHtmlElement : HTMLElement {
// also has obsolete members
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmliframeelement
[HTMLConstructor]
interface HTMLIFrameElement : HTMLElement {
attribute DOMString src;
// attribute DOMString srcdoc;

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlimageelement
[NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
[HTMLConstructor, NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
interface HTMLImageElement : HTMLElement {
attribute DOMString alt;
attribute DOMString src;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlinputelement
[HTMLConstructor]
interface HTMLInputElement : HTMLElement {
attribute DOMString accept;
attribute DOMString alt;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmllielement
[HTMLConstructor]
interface HTMLLIElement : HTMLElement {
attribute long value;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmllabelelement
[HTMLConstructor]
interface HTMLLabelElement : HTMLElement {
readonly attribute HTMLFormElement? form;
attribute DOMString htmlFor;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmllegendelement
[HTMLConstructor]
interface HTMLLegendElement : HTMLElement {
readonly attribute HTMLFormElement? form;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmllinkelement
[HTMLConstructor]
interface HTMLLinkElement : HTMLElement {
attribute DOMString href;
attribute DOMString? crossOrigin;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlmapelement
[HTMLConstructor]
interface HTMLMapElement : HTMLElement {
// attribute DOMString name;
//readonly attribute HTMLCollection areas;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlmetaelement
[HTMLConstructor]
interface HTMLMetaElement : HTMLElement {
attribute DOMString name;
// attribute DOMString httpEquiv;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlmeterelement
[HTMLConstructor]
interface HTMLMeterElement : HTMLElement {
// attribute double value;
// attribute double min;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlmodelement
[HTMLConstructor]
interface HTMLModElement : HTMLElement {
// attribute DOMString cite;
// attribute DOMString dateTime;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlolistelement
[HTMLConstructor]
interface HTMLOListElement : HTMLElement {
// attribute boolean reversed;
// attribute long start;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlobjectelement
[HTMLConstructor]
interface HTMLObjectElement : HTMLElement {
// attribute DOMString data;
attribute DOMString type;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmloptgroupelement
[HTMLConstructor]
interface HTMLOptGroupElement : HTMLElement {
attribute boolean disabled;
// attribute DOMString label;

View file

@ -3,9 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmloptionelement
//[NamedConstructor=Option(optional DOMString text = "", optional DOMString value,
// optional boolean defaultSelected = false,
// optional boolean selected = false)]
[HTMLConstructor/*, NamedConstructor=Option(optional DOMString text = "", optional DOMString value,
optional boolean defaultSelected = false,
optional boolean selected = false)*/]
interface HTMLOptionElement : HTMLElement {
attribute boolean disabled;
readonly attribute HTMLFormElement? form;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmloutputelement
[HTMLConstructor]
interface HTMLOutputElement : HTMLElement {
// [SameObject, PutForwards=value] readonly attribute DOMTokenList htmlFor;
readonly attribute HTMLFormElement? form;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlparagraphelement
[HTMLConstructor]
interface HTMLParagraphElement : HTMLElement {
// also has obsolete members
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlparamelement
[HTMLConstructor]
interface HTMLParamElement : HTMLElement {
// attribute DOMString name;
// attribute DOMString value;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlpreelement
[HTMLConstructor]
interface HTMLPreElement : HTMLElement {
// also has obsolete members
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlprogresselement
[HTMLConstructor]
interface HTMLProgressElement : HTMLElement {
// attribute double value;
// attribute double max;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlquoteelement
[HTMLConstructor]
interface HTMLQuoteElement : HTMLElement {
// attribute DOMString cite;
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlscriptelement
[HTMLConstructor]
interface HTMLScriptElement : HTMLElement {
attribute DOMString src;
attribute DOMString type;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlselectelement
[HTMLConstructor]
interface HTMLSelectElement : HTMLElement {
// attribute boolean autofocus;
attribute boolean disabled;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlsourceelement
[HTMLConstructor]
interface HTMLSourceElement : HTMLElement {
// attribute DOMString src;
// attribute DOMString type;

View file

@ -3,4 +3,5 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlspanelement
[HTMLConstructor]
interface HTMLSpanElement : HTMLElement {};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlstyleelement
[HTMLConstructor]
interface HTMLStyleElement : HTMLElement {
// attribute DOMString media;
// attribute DOMString type;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltablecaptionelement
[HTMLConstructor]
interface HTMLTableCaptionElement : HTMLElement {
// also has obsolete members
};

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltablecellelement
[Abstract]
[HTMLConstructor, Abstract]
interface HTMLTableCellElement : HTMLElement {
attribute unsigned long colSpan;
attribute unsigned long rowSpan;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltablecolelement
[HTMLConstructor]
interface HTMLTableColElement : HTMLElement {
// attribute unsigned long span;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltabledatacellelement
[HTMLConstructor]
interface HTMLTableDataCellElement : HTMLTableCellElement {
// also has obsolete members
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltableelement
[HTMLConstructor]
interface HTMLTableElement : HTMLElement {
attribute HTMLTableCaptionElement? caption;
HTMLTableCaptionElement createCaption();

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltableheadercellelement
[HTMLConstructor]
interface HTMLTableHeaderCellElement : HTMLTableCellElement {
// attribute DOMString scope;
// attribute DOMString abbr;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltablerowelement
[HTMLConstructor]
interface HTMLTableRowElement : HTMLElement {
readonly attribute long rowIndex;
readonly attribute long sectionRowIndex;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltablesectionelement
[HTMLConstructor]
interface HTMLTableSectionElement : HTMLElement {
readonly attribute HTMLCollection rows;
[Throws]

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltemplateelement
[HTMLConstructor]
interface HTMLTemplateElement : HTMLElement {
readonly attribute DocumentFragment content;
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltextareaelement
[HTMLConstructor]
interface HTMLTextAreaElement : HTMLElement {
// attribute DOMString autocomplete;
// attribute boolean autofocus;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltimeelement
[HTMLConstructor]
interface HTMLTimeElement : HTMLElement {
attribute DOMString dateTime;
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltitleelement
[HTMLConstructor]
interface HTMLTitleElement : HTMLElement {
[Pure]
attribute DOMString text;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmltrackelement
[HTMLConstructor]
interface HTMLTrackElement : HTMLElement {
// attribute DOMString kind;
// attribute DOMString src;

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlulistelement
[HTMLConstructor]
interface HTMLUListElement : HTMLElement {
// also has obsolete members
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlvideoelement
[HTMLConstructor]
interface HTMLVideoElement : HTMLMediaElement {
// attribute unsigned long width;
// attribute unsigned long height;