Bug 1274159 - Part 3-1: Add HTMLConstructor to HTMLElement and its subclass; r=bz

MozReview-Commit-ID: 1a2u7JUaFH2
This commit is contained in:
Edgar Chen 2016-11-17 17:34:42 +08:00
parent 881cbd80bd
commit 9a331e3ffa
67 changed files with 68 additions and 6 deletions

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-a-element
[HTMLConstructor]
interface HTMLAnchorElement : HTMLElement {
[SetterThrows]
attribute DOMString target;

View File

@ -13,6 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-area-element
[HTMLConstructor]
interface HTMLAreaElement : HTMLElement {
[SetterThrows]
attribute DOMString alt;

View File

@ -11,6 +11,6 @@
* and create derivative works of this document.
*/
[NamedConstructor=Audio(optional DOMString src)]
[HTMLConstructor, NamedConstructor=Audio(optional DOMString src)]
interface HTMLAudioElement : HTMLMediaElement {};

View File

@ -13,6 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-br-element
[HTMLConstructor]
interface HTMLBRElement : HTMLElement {};
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-base-element
[HTMLConstructor]
interface HTMLBaseElement : HTMLElement {
[SetterThrows, Pure]
attribute DOMString href;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLBodyElement : HTMLElement {
};

View File

@ -11,6 +11,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-button-element
[HTMLConstructor]
interface HTMLButtonElement : HTMLElement {
[SetterThrows, Pure]
attribute boolean autofocus;

View File

@ -13,6 +13,7 @@
interface nsISupports;
interface Variant;
[HTMLConstructor]
interface HTMLCanvasElement : HTMLElement {
[Pure, SetterThrows]
attribute unsigned long width;

View File

@ -13,6 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-dl-element
[HTMLConstructor]
interface HTMLDListElement : HTMLElement {
};

View File

@ -7,6 +7,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-data-element
*/
[HTMLConstructor]
interface HTMLDataElement : HTMLElement {
[SetterThrows]
attribute DOMString value;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLDataListElement : HTMLElement {
readonly attribute HTMLCollection options;
};

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLDetailsElement : HTMLElement {
[SetterThrows]
attribute boolean open;

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
[HTMLConstructor]
interface HTMLDirectoryElement : HTMLElement {
[SetterThrows, Pure]
attribute boolean compact;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLDivElement : HTMLElement {};
partial interface HTMLDivElement {

View File

@ -12,6 +12,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLElement : Element {
// metadata attributes
attribute DOMString title;

View File

@ -13,7 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
[NeedResolve]
[HTMLConstructor, NeedResolve]
interface HTMLEmbedElement : HTMLElement {
[Pure, SetterThrows]
attribute DOMString src;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLFieldSetElement : HTMLElement {
[SetterThrows]
attribute boolean disabled;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLFontElement : HTMLElement {
[TreatNullAs=EmptyString, SetterThrows] attribute DOMString color;
[SetterThrows] attribute DOMString face;

View File

@ -11,7 +11,7 @@
* and create derivative works of this document.
*/
[OverrideBuiltins, LegacyUnenumerableNamedProperties]
[OverrideBuiltins, LegacyUnenumerableNamedProperties, HTMLConstructor]
interface HTMLFormElement : HTMLElement {
[Pure, SetterThrows]
attribute DOMString acceptCharset;

View File

@ -11,6 +11,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#htmlframeelement
[HTMLConstructor]
interface HTMLFrameElement : HTMLElement {
[SetterThrows]
attribute DOMString name;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLFrameSetElement : HTMLElement {
[SetterThrows]
attribute DOMString cols;

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-hr-element
[HTMLConstructor]
interface HTMLHRElement : HTMLElement {
};

View File

@ -12,5 +12,6 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-head-element
[HTMLConstructor]
interface HTMLHeadElement : HTMLElement {};

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
[HTMLConstructor]
interface HTMLHeadingElement : HTMLElement {
};

View File

@ -13,6 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
[HTMLConstructor]
interface HTMLHtmlElement : HTMLElement {};
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLIFrameElement : HTMLElement {
[SetterThrows, Pure]
attribute DOMString src;

View File

@ -16,7 +16,8 @@ interface imgIRequest;
interface URI;
interface nsIStreamListener;
[NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
[HTMLConstructor,
NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
interface HTMLImageElement : HTMLElement {
[SetterThrows]
attribute DOMString alt;

View File

@ -21,6 +21,7 @@ enum SelectionMode {
interface nsIControllers;
[HTMLConstructor]
interface HTMLInputElement : HTMLElement {
[Pure, SetterThrows]
attribute DOMString accept;

View File

@ -13,6 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
[HTMLConstructor]
interface HTMLLIElement : HTMLElement {
[SetterThrows, Pure]
attribute long value;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLLabelElement : HTMLElement {
readonly attribute HTMLFormElement? form;
attribute DOMString htmlFor;

View File

@ -13,6 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-legend-element
[HTMLConstructor]
interface HTMLLegendElement : HTMLElement {
readonly attribute HTMLFormElement? form;
};

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-link-element
[HTMLConstructor]
interface HTMLLinkElement : HTMLElement {
[Pure]
attribute boolean disabled;

View File

@ -11,6 +11,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-map-element
[HTMLConstructor]
interface HTMLMapElement : HTMLElement {
[SetterThrows, Pure]
attribute DOMString name;

View File

@ -15,6 +15,7 @@
interface MenuBuilder;
// http://www.whatwg.org/specs/web-apps/current-work/#the-menu-element
[HTMLConstructor]
interface HTMLMenuElement : HTMLElement {
[SetterThrows]
attribute DOMString type;

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-menuitem-element
[HTMLConstructor]
interface HTMLMenuItemElement : HTMLElement {
[SetterThrows]
attribute DOMString type;

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-meta-element
[HTMLConstructor]
interface HTMLMetaElement : HTMLElement {
[SetterThrows, Pure]
attribute DOMString name;

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-meter-element
[HTMLConstructor]
interface HTMLMeterElement : HTMLElement {
[SetterThrows]
attribute double value;

View File

@ -11,6 +11,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#attributes-common-to-ins-and-del-elements
[HTMLConstructor]
interface HTMLModElement : HTMLElement {
[SetterThrows, Pure]
attribute DOMString cite;

View File

@ -13,6 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-ol-element
[HTMLConstructor]
interface HTMLOListElement : HTMLElement {
[SetterThrows]
attribute boolean reversed;

View File

@ -13,7 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
[NeedResolve, UnsafeInPrerendering]
[HTMLConstructor, NeedResolve, UnsafeInPrerendering]
interface HTMLObjectElement : HTMLElement {
[Pure, SetterThrows]
attribute DOMString data;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLOptGroupElement : HTMLElement {
[SetterThrows]
attribute boolean disabled;

View File

@ -11,7 +11,7 @@
* and create derivative works of this document.
*/
[NamedConstructor=Option(optional DOMString text, optional DOMString value, optional boolean defaultSelected, optional boolean selected)]
[HTMLConstructor, NamedConstructor=Option(optional DOMString text, optional DOMString value, optional boolean defaultSelected, optional boolean selected)]
interface HTMLOptionElement : HTMLElement {
[SetterThrows]
attribute boolean disabled;

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
[HTMLConstructor]
interface HTMLOutputElement : HTMLElement {
[PutForwards=value, Constant]
readonly attribute DOMTokenList htmlFor;

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-p-element
[HTMLConstructor]
interface HTMLParagraphElement : HTMLElement {
};

View File

@ -13,6 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-param-element
[HTMLConstructor]
interface HTMLParamElement : HTMLElement {
[SetterThrows, Pure]
attribute DOMString name;

View File

@ -4,5 +4,6 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[HTMLConstructor]
interface HTMLPictureElement : HTMLElement {
};

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-pre-element
[HTMLConstructor]
interface HTMLPreElement : HTMLElement {
};

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLProgressElement : HTMLElement {
[SetterThrows]
attribute double value;

View File

@ -12,6 +12,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element
[HTMLConstructor]
interface HTMLQuoteElement : HTMLElement {
[SetterThrows, Pure]
attribute DOMString cite;

View File

@ -8,6 +8,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
*/
[HTMLConstructor]
interface HTMLScriptElement : HTMLElement {
[SetterThrows]
attribute DOMString src;

View File

@ -7,6 +7,7 @@
* http://www.whatwg.org/html/#the-select-element
*/
[HTMLConstructor]
interface HTMLSelectElement : HTMLElement {
[SetterThrows, Pure]
attribute boolean autofocus;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLSourceElement : HTMLElement {
[SetterThrows]
attribute DOMString src;

View File

@ -12,4 +12,5 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-span-element
[HTMLConstructor]
interface HTMLSpanElement : HTMLElement {};

View File

@ -8,6 +8,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
*/
[HTMLConstructor]
interface HTMLStyleElement : HTMLElement {
[Pure]
attribute boolean disabled;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLTableCaptionElement : HTMLElement {};
partial interface HTMLTableCaptionElement {

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLTableCellElement : HTMLElement {
[SetterThrows]
attribute unsigned long colSpan;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLTableColElement : HTMLElement {
[SetterThrows]
attribute unsigned long span;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLTableElement : HTMLElement {
[SetterThrows]
attribute HTMLTableCaptionElement? caption;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLTableRowElement : HTMLElement {
readonly attribute long rowIndex;
readonly attribute long sectionRowIndex;

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLTableSectionElement : HTMLElement {
readonly attribute HTMLCollection rows;
[Throws]

View File

@ -9,6 +9,7 @@
* liability, trademark and document use rules apply.
*/
[HTMLConstructor]
interface HTMLTemplateElement : HTMLElement {
readonly attribute DocumentFragment content;
};

View File

@ -14,6 +14,7 @@
interface nsIEditor;
interface MozControllers;
[HTMLConstructor]
interface HTMLTextAreaElement : HTMLElement {
// attribute DOMString autocomplete;
[SetterThrows, Pure]

View File

@ -7,6 +7,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element
*/
[HTMLConstructor]
interface HTMLTimeElement : HTMLElement {
[SetterThrows]
attribute DOMString dateTime;

View File

@ -7,6 +7,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/#the-title-element
*/
[HTMLConstructor]
interface HTMLTitleElement : HTMLElement {
[Throws]
attribute DOMString text;

View File

@ -7,6 +7,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/#the-track-element
*/
[HTMLConstructor]
interface HTMLTrackElement : HTMLElement {
[SetterThrows, Pure]
attribute DOMString kind;

View File

@ -13,6 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-ul-element
[HTMLConstructor]
interface HTMLUListElement : HTMLElement {
};

View File

@ -11,6 +11,7 @@
* and create derivative works of this document.
*/
[HTMLConstructor]
interface HTMLVideoElement : HTMLMediaElement {
[SetterThrows]
attribute unsigned long width;