diff options
Diffstat (limited to 'components/script/dom/webidls')
126 files changed, 3381 insertions, 0 deletions
diff --git a/components/script/dom/webidls/Attr.webidl b/components/script/dom/webidls/Attr.webidl new file mode 100644 index 00000000000..2b3d18150d8 --- /dev/null +++ b/components/script/dom/webidls/Attr.webidl @@ -0,0 +1,18 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/#interface-attr + * + */ + +interface Attr { + readonly attribute DOMString localName; + attribute DOMString value; + + readonly attribute DOMString name; + readonly attribute DOMString? namespaceURI; + readonly attribute DOMString? prefix; +}; diff --git a/components/script/dom/webidls/Blob.webidl b/components/script/dom/webidls/Blob.webidl new file mode 100644 index 00000000000..3a544024338 --- /dev/null +++ b/components/script/dom/webidls/Blob.webidl @@ -0,0 +1,29 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob +//[Exposed=Window,Worker][Constructor, +// Constructor(sequence<(ArrayBuffer or ArrayBufferView or Blob or DOMString)> blobParts, optional BlobPropertyBag options)] +[Constructor] +interface Blob { + + //readonly attribute unsigned long long size; + //readonly attribute DOMString type; + //readonly attribute boolean isClosed; + + //slice Blob into byte-ranged chunks + + //Blob slice([Clamp] optional long long start, + // [Clamp] optional long long end, + // optional DOMString contentType); + //void close(); + +}; + +dictionary BlobPropertyBag { + + DOMString type = ""; + +}; diff --git a/components/script/dom/webidls/CanvasRenderingContext2D.webidl b/components/script/dom/webidls/CanvasRenderingContext2D.webidl new file mode 100644 index 00000000000..2043347bfd2 --- /dev/null +++ b/components/script/dom/webidls/CanvasRenderingContext2D.webidl @@ -0,0 +1,104 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#2dcontext +//[Constructor(optional unsigned long width, unsigned long height), Exposed=Window,Worker] +interface CanvasRenderingContext2D { + + // back-reference to the canvas + readonly attribute HTMLCanvasElement canvas; + + // canvas dimensions + // attribute unsigned long width; + // attribute unsigned long height; + + // for contexts that aren't directly fixed to a specific canvas + //void commit(); // push the image to the output bitmap + + // state + //void save(); // push state on state stack + //void restore(); // pop state stack and restore state + + // transformations (default transform is the identity matrix) + // attribute SVGMatrix currentTransform; + //void scale(unrestricted double x, unrestricted double y); + //void rotate(unrestricted double angle); + //void translate(unrestricted double x, unrestricted double y); + //void transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); + //void setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); + //void resetTransform(); + + // compositing + // attribute unrestricted double globalAlpha; // (default 1.0) + // attribute DOMString globalCompositeOperation; // (default source-over) + + // image smoothing + // attribute boolean imageSmoothingEnabled; // (default true) + + // colours and styles (see also the CanvasDrawingStyles interface) + // attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black) + // attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black) + //CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1); + //CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1); + //CanvasPattern createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition); + + // shadows + // attribute unrestricted double shadowOffsetX; // (default 0) + // attribute unrestricted double shadowOffsetY; // (default 0) + // attribute unrestricted double shadowBlur; // (default 0) + // attribute DOMString shadowColor; // (default transparent black) + + // rects + //void clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); + //[LenientFloat] + void clearRect(double x, double y, double w, double h); + //void fillRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); + //[LenientFloat] + void fillRect(double x, double y, double w, double h); + //void strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); + //[LenientFloat] + void strokeRect(double x, double y, double w, double h); + + // path API (see also CanvasPathMethods) + //void beginPath(); + //void fill(optional CanvasFillRule fillRule = "nonzero"); + //void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero"); + //void stroke(); + //void stroke(Path2D path); + //void drawSystemFocusRing(Element element); + //void drawSystemFocusRing(Path2D path, Element element); + //boolean drawCustomFocusRing(Element element); + //boolean drawCustomFocusRing(Path2D path, Element element); + //void scrollPathIntoView(); + //void scrollPathIntoView(Path2D path); + //void clip(optional CanvasFillRule fillRule = "nonzero"); + //void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero"); + //void resetClip(); + //boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero"); + //boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero"); + //boolean isPointInStroke(unrestricted double x, unrestricted double y); + //boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y); + + // text (see also the CanvasDrawingStyles interface) + //void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); + //void strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); + //TextMetrics measureText(DOMString text); + + // drawing images + //void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy); + //void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); + //void drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); + + // hit regions + //void addHitRegion(optional HitRegionOptions options); + //void removeHitRegion(DOMString id); + + // pixel manipulation + //ImageData createImageData(double sw, double sh); + //ImageData createImageData(ImageData imagedata); + //ImageData getImageData(double sx, double sy, double sw, double sh); + //void putImageData(ImageData imagedata, double dx, double dy); + //void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight); +}; diff --git a/components/script/dom/webidls/CharacterData.webidl b/components/script/dom/webidls/CharacterData.webidl new file mode 100644 index 00000000000..d1b222bc168 --- /dev/null +++ b/components/script/dom/webidls/CharacterData.webidl @@ -0,0 +1,28 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/#characterdata + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +interface CharacterData : Node { + [TreatNullAs=EmptyString,SetterThrows] attribute DOMString data; + readonly attribute unsigned long length; + [Throws] + DOMString substringData(unsigned long offset, unsigned long count); + [Throws] + void appendData(DOMString data); + [Throws] + void insertData(unsigned long offset, DOMString data); + [Throws] + void deleteData(unsigned long offset, unsigned long count); + [Throws] + void replaceData(unsigned long offset, unsigned long count, DOMString data); +}; + +CharacterData implements ChildNode; diff --git a/components/script/dom/webidls/ChildNode.webidl b/components/script/dom/webidls/ChildNode.webidl new file mode 100644 index 00000000000..16562fbafbf --- /dev/null +++ b/components/script/dom/webidls/ChildNode.webidl @@ -0,0 +1,25 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is: + * http://dom.spec.whatwg.org/#interface-childnode + */ + +[NoInterfaceObject] +interface ChildNode { +// Not implemented yet: +// void before((Node or DOMString)... nodes); +// void after((Node or DOMString)... nodes); +// void replace((Node or DOMString)... nodes); + void remove(); +}; + +// [NoInterfaceObject] +// interface NonDocumentTypeChildNode { +// [Pure] +// readonly attribute Element? previousElementSibling; +// [Pure] +// readonly attribute Element? nextElementSibling; +// }; diff --git a/components/script/dom/webidls/Comment.webidl b/components/script/dom/webidls/Comment.webidl new file mode 100644 index 00000000000..023335f166a --- /dev/null +++ b/components/script/dom/webidls/Comment.webidl @@ -0,0 +1,15 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/#comment + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Constructor(optional DOMString data = "")] +interface Comment : CharacterData { +}; diff --git a/components/script/dom/webidls/Console.webidl b/components/script/dom/webidls/Console.webidl new file mode 100644 index 00000000000..23b294596a8 --- /dev/null +++ b/components/script/dom/webidls/Console.webidl @@ -0,0 +1,21 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * References: + * MDN Docs - https://developer.mozilla.org/en-US/docs/Web/API/console + * Draft Spec - http://sideshowbarker.github.io/console-spec/ + * + * © Copyright 2014 Mozilla Foundation. + */ + +interface Console { + // These should be DOMString message, DOMString message2, ... + void log(DOMString message); + void debug(DOMString message); + void info(DOMString message); + void warn(DOMString message); + void error(DOMString message); + void assert(boolean condition, optional DOMString message); +}; diff --git a/components/script/dom/webidls/CustomEvent.webidl b/components/script/dom/webidls/CustomEvent.webidl new file mode 100644 index 00000000000..bfc99c99954 --- /dev/null +++ b/components/script/dom/webidls/CustomEvent.webidl @@ -0,0 +1,27 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * For more information on this interface please see + * http://dom.spec.whatwg.org/#interface-customevent + * + * To the extent possible under law, the editors have waived + * all copyright and related or neighboring rights to this work. + * In addition, as of 1 May 2014, the editors have made this specification + * available under the Open Web Foundation Agreement Version 1.0, + * which is available at + * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0. + */ + +[Constructor(DOMString type, optional CustomEventInit eventInitDict)/*, + Exposed=Window,Worker*/] +interface CustomEvent : Event { + readonly attribute any detail; + + void initCustomEvent(DOMString type, boolean bubbles, boolean cancelable, any detail); +}; + +dictionary CustomEventInit : EventInit { + any detail = null; +}; diff --git a/components/script/dom/webidls/DOMException.webidl b/components/script/dom/webidls/DOMException.webidl new file mode 100644 index 00000000000..7347d2e76cc --- /dev/null +++ b/components/script/dom/webidls/DOMException.webidl @@ -0,0 +1,47 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is: + * http://dom.spec.whatwg.org/#domexception + */ + +// XXXkhuey this is an 'exception', not an interface, but we don't have any +// parser or codegen mechanisms for dealing with exceptions. +interface DOMException { + const unsigned short INDEX_SIZE_ERR = 1; + const unsigned short DOMSTRING_SIZE_ERR = 2; // historical + const unsigned short HIERARCHY_REQUEST_ERR = 3; + const unsigned short WRONG_DOCUMENT_ERR = 4; + const unsigned short INVALID_CHARACTER_ERR = 5; + const unsigned short NO_DATA_ALLOWED_ERR = 6; // historical + const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7; + const unsigned short NOT_FOUND_ERR = 8; + const unsigned short NOT_SUPPORTED_ERR = 9; + const unsigned short INUSE_ATTRIBUTE_ERR = 10; // historical + const unsigned short INVALID_STATE_ERR = 11; + const unsigned short SYNTAX_ERR = 12; + const unsigned short INVALID_MODIFICATION_ERR = 13; + const unsigned short NAMESPACE_ERR = 14; + const unsigned short INVALID_ACCESS_ERR = 15; + const unsigned short VALIDATION_ERR = 16; // historical + const unsigned short TYPE_MISMATCH_ERR = 17; // historical; use JavaScript's TypeError instead + const unsigned short SECURITY_ERR = 18; + const unsigned short NETWORK_ERR = 19; + const unsigned short ABORT_ERR = 20; + const unsigned short URL_MISMATCH_ERR = 21; + const unsigned short QUOTA_EXCEEDED_ERR = 22; + const unsigned short TIMEOUT_ERR = 23; + const unsigned short INVALID_NODE_TYPE_ERR = 24; + const unsigned short DATA_CLONE_ERR = 25; + + // Error code as u16 + readonly attribute unsigned short code; + + // The name of the error code (ie, a string repr of |code|) + readonly attribute DOMString name; + + // A custom message set by the thrower. + readonly attribute DOMString message; +}; diff --git a/components/script/dom/webidls/DOMImplementation.webidl b/components/script/dom/webidls/DOMImplementation.webidl new file mode 100644 index 00000000000..50f7510b800 --- /dev/null +++ b/components/script/dom/webidls/DOMImplementation.webidl @@ -0,0 +1,25 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/#interface-domimplementation + * + * Copyright: + * To the extent possible under law, the editors have waived all copyright and + * related or neighboring rights to this work. + */ + +interface DOMImplementation { + /*boolean hasFeature(DOMString feature, + [TreatNullAs=EmptyString] DOMString version);*/ + [Throws] + DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, + DOMString systemId); + [Throws] + Document createDocument(DOMString? namespace, + [TreatNullAs=EmptyString] DOMString qualifiedName, + optional DocumentType? doctype = null); + Document createHTMLDocument(optional DOMString title); +}; diff --git a/components/script/dom/webidls/DOMParser.webidl b/components/script/dom/webidls/DOMParser.webidl new file mode 100644 index 00000000000..236fae785f2 --- /dev/null +++ b/components/script/dom/webidls/DOMParser.webidl @@ -0,0 +1,21 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://domparsing.spec.whatwg.org/#the-domparser-interface + */ + +enum SupportedType { + "text/html", + "text/xml", + "application/xml", + "application/xhtml+xml", + "image/svg+xml" +}; + +[Constructor] +interface DOMParser { + [Throws] + Document parseFromString(DOMString str, SupportedType type); +}; diff --git a/components/script/dom/webidls/DOMRect.webidl b/components/script/dom/webidls/DOMRect.webidl new file mode 100644 index 00000000000..6e0fe24b57d --- /dev/null +++ b/components/script/dom/webidls/DOMRect.webidl @@ -0,0 +1,14 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://dev.w3.org/fxtf/geometry/#DOMRect +interface DOMRect { + readonly attribute float top; + readonly attribute float right; + readonly attribute float bottom; + readonly attribute float left; + readonly attribute float width; + readonly attribute float height; +}; diff --git a/components/script/dom/webidls/DOMRectList.webidl b/components/script/dom/webidls/DOMRectList.webidl new file mode 100644 index 00000000000..064014e9abe --- /dev/null +++ b/components/script/dom/webidls/DOMRectList.webidl @@ -0,0 +1,12 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://dev.w3.org/fxtf/geometry/#DOMRectList +[NoInterfaceObject/*, + ArrayClass*/] +interface DOMRectList { + readonly attribute unsigned long length; + getter DOMRect? item(unsigned long index); +}; diff --git a/components/script/dom/webidls/DOMTokenList.webidl b/components/script/dom/webidls/DOMTokenList.webidl new file mode 100644 index 00000000000..bc32f4bf256 --- /dev/null +++ b/components/script/dom/webidls/DOMTokenList.webidl @@ -0,0 +1,18 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://dom.spec.whatwg.org/#domtokenlist +interface DOMTokenList { + readonly attribute unsigned long length; + getter DOMString? item(unsigned long index); + + [Throws] + boolean contains(DOMString token); + + //void add(DOMString... tokens); + //void remove(DOMString... tokens); + //boolean toggle(DOMString token, optional boolean force); + //stringifier; +}; diff --git a/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl b/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl new file mode 100644 index 00000000000..dbf2891f72a --- /dev/null +++ b/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl @@ -0,0 +1,10 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#dedicatedworkerglobalscope +[Global/*=Worker,DedicatedWorker*/] +/*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope { + void postMessage(any message/*, optional sequence<Transferable> transfer*/); + attribute EventHandler onmessage; +}; diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl new file mode 100644 index 00000000000..0599ba71f95 --- /dev/null +++ b/components/script/dom/webidls/Document.webidl @@ -0,0 +1,71 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is: + * http://dom.spec.whatwg.org/#interface-document + * http://www.whatwg.org/specs/web-apps/current-work/#the-document-object + */ + +/* http://dom.spec.whatwg.org/#interface-document */ +[Constructor] +interface Document : Node { + readonly attribute DOMImplementation implementation; + readonly attribute DOMString URL; + readonly attribute DOMString documentURI; + readonly attribute DOMString compatMode; + readonly attribute DOMString characterSet; + readonly attribute DOMString contentType; + readonly attribute Location location; + + readonly attribute DocumentType? doctype; + readonly attribute Element? documentElement; + HTMLCollection getElementsByTagName(DOMString localName); + HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); + HTMLCollection getElementsByClassName(DOMString classNames); + Element? getElementById(DOMString elementId); + + [Throws] + Element createElement(DOMString localName); + [Throws] + Element createElementNS(DOMString? namespace, DOMString qualifiedName); + DocumentFragment createDocumentFragment(); + Text createTextNode(DOMString data); + Comment createComment(DOMString data); + [Throws] + ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data); + + [Throws] + Node importNode(Node node, optional boolean deep = false); + [Throws] + Node adoptNode(Node node); + + [Throws] + Event createEvent(DOMString interface_); + + Range createRange(); +}; + +/* http://www.whatwg.org/specs/web-apps/current-work/#the-document-object */ +partial interface Document { + readonly attribute DOMString lastModified; + [SetterThrows] + attribute DOMString title; + [SetterThrows] + attribute HTMLElement? body; + readonly attribute HTMLHeadElement? head; + NodeList getElementsByName(DOMString elementName); + + readonly attribute HTMLCollection images; + readonly attribute HTMLCollection embeds; + readonly attribute HTMLCollection plugins; + readonly attribute HTMLCollection links; + readonly attribute HTMLCollection forms; + readonly attribute HTMLCollection scripts; + readonly attribute HTMLCollection anchors; + readonly attribute HTMLCollection applets; +}; + +Document implements ParentNode; +Document implements GlobalEventHandlers; diff --git a/components/script/dom/webidls/DocumentFragment.webidl b/components/script/dom/webidls/DocumentFragment.webidl new file mode 100644 index 00000000000..4248975f768 --- /dev/null +++ b/components/script/dom/webidls/DocumentFragment.webidl @@ -0,0 +1,11 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://dom.spec.whatwg.org/#interface-documentfragment +[Constructor] +interface DocumentFragment : Node { +}; + +DocumentFragment implements ParentNode; diff --git a/components/script/dom/webidls/DocumentType.webidl b/components/script/dom/webidls/DocumentType.webidl new file mode 100644 index 00000000000..89190266fde --- /dev/null +++ b/components/script/dom/webidls/DocumentType.webidl @@ -0,0 +1,19 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/#documenttype + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +interface DocumentType : Node { + readonly attribute DOMString name; + readonly attribute DOMString publicId; + readonly attribute DOMString systemId; +}; + +DocumentType implements ChildNode; diff --git a/components/script/dom/webidls/Element.webidl b/components/script/dom/webidls/Element.webidl new file mode 100644 index 00000000000..fc737bdb9ec --- /dev/null +++ b/components/script/dom/webidls/Element.webidl @@ -0,0 +1,70 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/#element and + * http://domparsing.spec.whatwg.org/ and + * http://dev.w3.org/csswg/cssom-view/ and + * http://www.w3.org/TR/selectors-api/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +interface Element : Node { + + readonly attribute DOMString? prefix; + readonly attribute DOMString localName; + + [Constant] + readonly attribute DOMString? namespaceURI; + // Not [Constant] because it depends on which document we're in + [Pure] + readonly attribute DOMString tagName; + + [Pure] + attribute DOMString id; + [Pure] + attribute DOMString className; + [Constant] + readonly attribute DOMTokenList classList; + + [Constant] + readonly attribute NamedNodeMap attributes; + DOMString? getAttribute(DOMString name); + DOMString? getAttributeNS(DOMString? namespace, DOMString localName); + [Throws] + void setAttribute(DOMString name, DOMString value); + [Throws] + void setAttributeNS(DOMString? namespace, DOMString name, DOMString value); + void removeAttribute(DOMString name); + void removeAttributeNS(DOMString? namespace, DOMString localName); + boolean hasAttribute(DOMString name); + boolean hasAttributeNS(DOMString? namespace, DOMString localName); + + [Throws] + boolean matches(DOMString selectors); + + HTMLCollection getElementsByTagName(DOMString localName); + HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); + HTMLCollection getElementsByClassName(DOMString classNames); +}; + +// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-element-interface +partial interface Element { + DOMRectList getClientRects(); + DOMRect getBoundingClientRect(); +}; + +// http://domparsing.spec.whatwg.org/#extensions-to-the-element-interface +partial interface Element { + [Throws,TreatNullAs=EmptyString] + readonly attribute DOMString innerHTML; + [Throws,TreatNullAs=EmptyString] + readonly attribute DOMString outerHTML; +}; + +Element implements ChildNode; +Element implements ParentNode; diff --git a/components/script/dom/webidls/Event.webidl b/components/script/dom/webidls/Event.webidl new file mode 100644 index 00000000000..6e574427548 --- /dev/null +++ b/components/script/dom/webidls/Event.webidl @@ -0,0 +1,43 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * For more information on this interface please see + * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Constructor(DOMString type, optional EventInit eventInitDict)] +interface Event { + readonly attribute DOMString type; + readonly attribute EventTarget? target; + readonly attribute EventTarget? currentTarget; + + const unsigned short NONE = 0; + const unsigned short CAPTURING_PHASE = 1; + const unsigned short AT_TARGET = 2; + const unsigned short BUBBLING_PHASE = 3; + readonly attribute unsigned short eventPhase; + + void stopPropagation(); + void stopImmediatePropagation(); + + readonly attribute boolean bubbles; + readonly attribute boolean cancelable; + void preventDefault(); + readonly attribute boolean defaultPrevented; + + readonly attribute boolean isTrusted; + readonly attribute DOMTimeStamp timeStamp; + + void initEvent(DOMString type, boolean bubbles, boolean cancelable); +}; + +dictionary EventInit { + boolean bubbles = false; + boolean cancelable = false; +}; + diff --git a/components/script/dom/webidls/EventHandler.webidl b/components/script/dom/webidls/EventHandler.webidl new file mode 100644 index 00000000000..1278d7467fd --- /dev/null +++ b/components/script/dom/webidls/EventHandler.webidl @@ -0,0 +1,46 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://www.whatwg.org/specs/web-apps/current-work/#eventhandler + * + * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and + * Opera Software ASA. You are granted a license to use, reproduce + * and create derivative works of this document. + */ + +[TreatNonObjectAsNull] +callback EventHandlerNonNull = any (Event event); +typedef EventHandlerNonNull? EventHandler; + +[TreatNonObjectAsNull] +callback OnErrorEventHandlerNonNull = boolean ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error); +typedef OnErrorEventHandlerNonNull? OnErrorEventHandler; + +[NoInterfaceObject] +interface GlobalEventHandlers { + attribute EventHandler onclick; + attribute EventHandler onload; +}; + +[NoInterfaceObject] +interface WindowEventHandlers { + attribute EventHandler onunload; +}; + +// The spec has |attribute OnErrorEventHandler onerror;| on +// GlobalEventHandlers, and calls the handler differently depending on +// whether an ErrorEvent was fired. We don't do that, and until we do we'll +// need to distinguish between onerror on Window or on nodes. + +/*[NoInterfaceObject] +interface OnErrorEventHandlerForNodes { + attribute EventHandler onerror; +};*/ + +[NoInterfaceObject] +interface OnErrorEventHandlerForWindow { + attribute OnErrorEventHandler onerror; +}; diff --git a/components/script/dom/webidls/EventListener.webidl b/components/script/dom/webidls/EventListener.webidl new file mode 100644 index 00000000000..05e1684d31e --- /dev/null +++ b/components/script/dom/webidls/EventListener.webidl @@ -0,0 +1,16 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://www.w3.org/TR/2012/WD-dom-20120105/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +callback interface EventListener { + void handleEvent(Event event); +}; + diff --git a/components/script/dom/webidls/EventTarget.webidl b/components/script/dom/webidls/EventTarget.webidl new file mode 100644 index 00000000000..897756fa273 --- /dev/null +++ b/components/script/dom/webidls/EventTarget.webidl @@ -0,0 +1,22 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://www.w3.org/TR/2012/WD-dom-20120105/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +interface EventTarget { + void addEventListener(DOMString type, + EventListener? listener, + optional boolean capture = false); + void removeEventListener(DOMString type, + EventListener? listener, + optional boolean capture = false); + [Throws] + boolean dispatchEvent(Event event); +}; diff --git a/components/script/dom/webidls/File.webidl b/components/script/dom/webidls/File.webidl new file mode 100644 index 00000000000..0d5967b5e55 --- /dev/null +++ b/components/script/dom/webidls/File.webidl @@ -0,0 +1,15 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://dev.w3.org/2006/webapi/FileAPI/#dfn-file + +// [Constructor(sequence<(Blob or DOMString or ArrayBufferView or ArrayBuffer)> fileBits, +// [EnsureUTF16] DOMString fileName, optional FilePropertyBag options)] +interface File : Blob { + + readonly attribute DOMString name; + // readonly attribute Date lastModifiedDate; + +};
\ No newline at end of file diff --git a/components/script/dom/webidls/FormData.webidl b/components/script/dom/webidls/FormData.webidl new file mode 100644 index 00000000000..cfa3e89b3cd --- /dev/null +++ b/components/script/dom/webidls/FormData.webidl @@ -0,0 +1,22 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://xhr.spec.whatwg.org + */ + +typedef (File or DOMString) FormDataEntryValue; + +[Constructor(optional HTMLFormElement form)] +interface FormData { + void append(DOMString name, Blob value, optional DOMString filename); + void append(DOMString name, DOMString value); + void delete(DOMString name); + FormDataEntryValue? get(DOMString name); + // sequence<FormDataEntryValue> getAll(DOMString name); + boolean has(DOMString name); + void set(DOMString name, Blob value, optional DOMString filename); + void set(DOMString name, DOMString value); +}; diff --git a/components/script/dom/webidls/HTMLAnchorElement.webidl b/components/script/dom/webidls/HTMLAnchorElement.webidl new file mode 100644 index 00000000000..de80a803514 --- /dev/null +++ b/components/script/dom/webidls/HTMLAnchorElement.webidl @@ -0,0 +1,38 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://www.whatwg.org/specs/web-apps/current-work/#the-a-element + * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis + * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and + * Opera Software ASA. You are granted a license to use, reproduce + * and create derivative works of this document. + */ + +// http://www.whatwg.org/html/#htmlanchorelement +interface HTMLAnchorElement : HTMLElement { + // attribute DOMString target; + // attribute DOMString download; + //[PutForwards=value] attribute DOMSettableTokenList ping; + // attribute DOMString rel; + //readonly attribute DOMTokenList relList; + // attribute DOMString hreflang; + // attribute DOMString type; + + [Pure] + attribute DOMString text; + + // also has obsolete members +}; +//HTMLAnchorElement implements URLUtils; + +// http://www.whatwg.org/html/#HTMLAnchorElement-partial +partial interface HTMLAnchorElement { + // attribute DOMString coords; + // attribute DOMString charset; + // attribute DOMString name; + // attribute DOMString rev; + // attribute DOMString shape; +}; diff --git a/components/script/dom/webidls/HTMLAppletElement.webidl b/components/script/dom/webidls/HTMLAppletElement.webidl new file mode 100644 index 00000000000..2612ffee2a1 --- /dev/null +++ b/components/script/dom/webidls/HTMLAppletElement.webidl @@ -0,0 +1,19 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlappletelement +interface HTMLAppletElement : HTMLElement { + // attribute DOMString align; + // attribute DOMString alt; + // attribute DOMString archive; + // attribute DOMString code; + // attribute DOMString codeBase; + // attribute DOMString height; + // attribute unsigned long hspace; + // attribute DOMString name; + // attribute DOMString _object; // the underscore is not part of the identifier + // attribute unsigned long vspace; + // attribute DOMString width; +}; diff --git a/components/script/dom/webidls/HTMLAreaElement.webidl b/components/script/dom/webidls/HTMLAreaElement.webidl new file mode 100644 index 00000000000..0cbbe2d7ce1 --- /dev/null +++ b/components/script/dom/webidls/HTMLAreaElement.webidl @@ -0,0 +1,26 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlareaelement +interface HTMLAreaElement : HTMLElement { + // attribute DOMString alt; + // attribute DOMString coords; + // attribute DOMString shape; + // attribute DOMString target; + // attribute DOMString download; + //[PutForwards=value] attribute DOMSettableTokenList ping; + // attribute DOMString rel; + //readonly attribute DOMTokenList relList; + // attribute DOMString hreflang; + // attribute DOMString type; + + // also has obsolete members +}; +//HTMLAreaElement implements URLUtils; + +// http://www.whatwg.org/html/#HTMLAreaElement-partial +partial interface HTMLAreaElement { + // attribute boolean noHref; +}; diff --git a/components/script/dom/webidls/HTMLAudioElement.webidl b/components/script/dom/webidls/HTMLAudioElement.webidl new file mode 100644 index 00000000000..9832eeda044 --- /dev/null +++ b/components/script/dom/webidls/HTMLAudioElement.webidl @@ -0,0 +1,8 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlaudioelement +//[NamedConstructor=Audio(optional DOMString src)] +interface HTMLAudioElement : HTMLMediaElement {}; diff --git a/components/script/dom/webidls/HTMLBRElement.webidl b/components/script/dom/webidls/HTMLBRElement.webidl new file mode 100644 index 00000000000..972b9377a0e --- /dev/null +++ b/components/script/dom/webidls/HTMLBRElement.webidl @@ -0,0 +1,14 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlbrelement +interface HTMLBRElement : HTMLElement { + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLBRElement-partial +partial interface HTMLBRElement { + // attribute DOMString clear; +}; diff --git a/components/script/dom/webidls/HTMLBaseElement.webidl b/components/script/dom/webidls/HTMLBaseElement.webidl new file mode 100644 index 00000000000..c39951b6783 --- /dev/null +++ b/components/script/dom/webidls/HTMLBaseElement.webidl @@ -0,0 +1,10 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlbaseelement +interface HTMLBaseElement : HTMLElement { + // attribute DOMString href; + // attribute DOMString target; +}; diff --git a/components/script/dom/webidls/HTMLBodyElement.webidl b/components/script/dom/webidls/HTMLBodyElement.webidl new file mode 100644 index 00000000000..6d6967d2709 --- /dev/null +++ b/components/script/dom/webidls/HTMLBodyElement.webidl @@ -0,0 +1,21 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlbodyelement +interface HTMLBodyElement : HTMLElement { + + // also has obsolete members +}; +HTMLBodyElement implements WindowEventHandlers; + +// http://www.whatwg.org/html/#HTMLBodyElement-partial +partial interface HTMLBodyElement { + //[TreatNullAs=EmptyString] attribute DOMString text; + //[TreatNullAs=EmptyString] attribute DOMString link; + //[TreatNullAs=EmptyString] attribute DOMString vLink; + //[TreatNullAs=EmptyString] attribute DOMString aLink; + //[TreatNullAs=EmptyString] attribute DOMString bgColor; + // attribute DOMString background; +}; diff --git a/components/script/dom/webidls/HTMLButtonElement.webidl b/components/script/dom/webidls/HTMLButtonElement.webidl new file mode 100644 index 00000000000..ad21e11370f --- /dev/null +++ b/components/script/dom/webidls/HTMLButtonElement.webidl @@ -0,0 +1,29 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlbuttonelement +interface HTMLButtonElement : HTMLElement { + // attribute boolean autofocus; + attribute boolean disabled; + //readonly attribute HTMLFormElement? form; + // attribute DOMString formAction; + // attribute DOMString formEnctype; + // attribute DOMString formMethod; + // attribute boolean formNoValidate; + // attribute DOMString formTarget; + // attribute DOMString name; + // attribute DOMString type; + // attribute DOMString value; + // attribute HTMLMenuElement? menu; + + //readonly attribute boolean willValidate; + readonly attribute ValidityState validity; + //readonly attribute DOMString validationMessage; + //boolean checkValidity(); + //boolean reportValidity(); + //void setCustomValidity(DOMString error); + + //readonly attribute NodeList labels; +}; diff --git a/components/script/dom/webidls/HTMLCanvasElement.webidl b/components/script/dom/webidls/HTMLCanvasElement.webidl new file mode 100644 index 00000000000..baff0dc745c --- /dev/null +++ b/components/script/dom/webidls/HTMLCanvasElement.webidl @@ -0,0 +1,24 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlcanvaselement +//typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext; + +interface HTMLCanvasElement : HTMLElement { + [Pure] + attribute unsigned long width; + [Pure] + attribute unsigned long height; + + //RenderingContext? getContext(DOMString contextId, any... arguments); + CanvasRenderingContext2D? getContext(DOMString contextId); + //boolean probablySupportsContext(DOMString contextId, any... arguments); + + //void setContext(RenderingContext context); + //CanvasProxy transferControlToProxy(); + + //DOMString toDataURL(optional DOMString type, any... arguments); + //void toBlob(FileCallback? _callback, optional DOMString type, any... arguments); +}; diff --git a/components/script/dom/webidls/HTMLCollection.webidl b/components/script/dom/webidls/HTMLCollection.webidl new file mode 100644 index 00000000000..26227c54c4a --- /dev/null +++ b/components/script/dom/webidls/HTMLCollection.webidl @@ -0,0 +1,10 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +interface HTMLCollection { + readonly attribute unsigned long length; + getter Element? item(unsigned long index); + getter Element? namedItem(DOMString name); +}; diff --git a/components/script/dom/webidls/HTMLDListElement.webidl b/components/script/dom/webidls/HTMLDListElement.webidl new file mode 100644 index 00000000000..3c0a8b9c63d --- /dev/null +++ b/components/script/dom/webidls/HTMLDListElement.webidl @@ -0,0 +1,14 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmldlistelement +interface HTMLDListElement : HTMLElement { + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLDListElement-partial +partial interface HTMLDListElement { + // attribute boolean compact; +}; diff --git a/components/script/dom/webidls/HTMLDataElement.webidl b/components/script/dom/webidls/HTMLDataElement.webidl new file mode 100644 index 00000000000..c6025423fb0 --- /dev/null +++ b/components/script/dom/webidls/HTMLDataElement.webidl @@ -0,0 +1,9 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmldataelement +interface HTMLDataElement : HTMLElement { + // attribute DOMString value; +}; diff --git a/components/script/dom/webidls/HTMLDataListElement.webidl b/components/script/dom/webidls/HTMLDataListElement.webidl new file mode 100644 index 00000000000..ae7055bb48c --- /dev/null +++ b/components/script/dom/webidls/HTMLDataListElement.webidl @@ -0,0 +1,9 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmldatalistelement +interface HTMLDataListElement : HTMLElement { + readonly attribute HTMLCollection options; +}; diff --git a/components/script/dom/webidls/HTMLDirectoryElement.webidl b/components/script/dom/webidls/HTMLDirectoryElement.webidl new file mode 100644 index 00000000000..6015b4e8859 --- /dev/null +++ b/components/script/dom/webidls/HTMLDirectoryElement.webidl @@ -0,0 +1,9 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmldirectoryelement +interface HTMLDirectoryElement : HTMLElement { + // attribute boolean compact; +}; diff --git a/components/script/dom/webidls/HTMLDivElement.webidl b/components/script/dom/webidls/HTMLDivElement.webidl new file mode 100644 index 00000000000..be451ce3e23 --- /dev/null +++ b/components/script/dom/webidls/HTMLDivElement.webidl @@ -0,0 +1,14 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmldivelement +interface HTMLDivElement : HTMLElement { + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLDivElement-partial +partial interface HTMLDivElement { + // attribute DOMString align; +}; diff --git a/components/script/dom/webidls/HTMLElement.webidl b/components/script/dom/webidls/HTMLElement.webidl new file mode 100644 index 00000000000..ebaa83a19bf --- /dev/null +++ b/components/script/dom/webidls/HTMLElement.webidl @@ -0,0 +1,48 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlelement +interface HTMLElement : Element { + // metadata attributes + // attribute DOMString title; + // attribute DOMString lang; + // attribute boolean translate; + // attribute DOMString dir; + //readonly attribute DOMStringMap dataset; + + // microdata + // attribute boolean itemScope; + //[PutForwards=value] readonly attribute DOMSettableTokenList itemType; + // attribute DOMString itemId; + //[PutForwards=value] readonly attribute DOMSettableTokenList itemRef; + //[PutForwards=value] readonly attribute DOMSettableTokenList itemProp; + //readonly attribute HTMLPropertiesCollection properties; + // attribute any itemValue; // acts as DOMString on setting + + // user interaction + // attribute boolean hidden; + //void click(); + // attribute long tabIndex; + //void focus(); + //void blur(); + // attribute DOMString accessKey; + //readonly attribute DOMString accessKeyLabel; + // attribute boolean draggable; + //[PutForwards=value] readonly attribute DOMSettableTokenList dropzone; + // attribute DOMString contentEditable; + //readonly attribute boolean isContentEditable; + // attribute HTMLMenuElement? contextMenu; + // attribute boolean spellcheck; + //void forceSpellCheck(); + + // command API + //readonly attribute DOMString? commandType; + //readonly attribute DOMString? commandLabel; + //readonly attribute DOMString? commandIcon; + //readonly attribute boolean? commandHidden; + //readonly attribute boolean? commandDisabled; + //readonly attribute boolean? commandChecked; +}; +HTMLElement implements GlobalEventHandlers; diff --git a/components/script/dom/webidls/HTMLEmbedElement.webidl b/components/script/dom/webidls/HTMLEmbedElement.webidl new file mode 100644 index 00000000000..0b708113b55 --- /dev/null +++ b/components/script/dom/webidls/HTMLEmbedElement.webidl @@ -0,0 +1,21 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlembedelement +interface HTMLEmbedElement : HTMLElement { + // attribute DOMString src; + // attribute DOMString type; + // attribute DOMString width; + // attribute DOMString height; + //legacycaller any (any... arguments); + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLEmbedElement-partial +partial interface HTMLEmbedElement { + // attribute DOMString align; + // attribute DOMString name; +}; diff --git a/components/script/dom/webidls/HTMLFieldSetElement.webidl b/components/script/dom/webidls/HTMLFieldSetElement.webidl new file mode 100644 index 00000000000..6b64c60bd21 --- /dev/null +++ b/components/script/dom/webidls/HTMLFieldSetElement.webidl @@ -0,0 +1,23 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlfieldsetelement +interface HTMLFieldSetElement : HTMLElement { + attribute boolean disabled; + //readonly attribute HTMLFormElement? form; + // attribute DOMString name; + + //readonly attribute DOMString type; + + //readonly attribute HTMLFormControlsCollection elements; + readonly attribute HTMLCollection elements; + + //readonly attribute boolean willValidate; + readonly attribute ValidityState validity; + //readonly attribute DOMString validationMessage; + //boolean checkValidity(); + //boolean reportValidity(); + //void setCustomValidity(DOMString error); +}; diff --git a/components/script/dom/webidls/HTMLFontElement.webidl b/components/script/dom/webidls/HTMLFontElement.webidl new file mode 100644 index 00000000000..4bdcb766745 --- /dev/null +++ b/components/script/dom/webidls/HTMLFontElement.webidl @@ -0,0 +1,11 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlfontelement +interface HTMLFontElement : HTMLElement { + //[TreatNullAs=EmptyString] attribute DOMString color; + // attribute DOMString face; + // attribute DOMString size; +}; diff --git a/components/script/dom/webidls/HTMLFormElement.webidl b/components/script/dom/webidls/HTMLFormElement.webidl new file mode 100644 index 00000000000..ffa36bc4d6b --- /dev/null +++ b/components/script/dom/webidls/HTMLFormElement.webidl @@ -0,0 +1,30 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlformelement +//[OverrideBuiltins] +interface HTMLFormElement : HTMLElement { + // attribute DOMString acceptCharset; + // attribute DOMString action; + // attribute DOMString autocomplete; + // attribute DOMString enctype; + // attribute DOMString encoding; + // attribute DOMString method; + // attribute DOMString name; + // attribute boolean noValidate; + // attribute DOMString target; + + //readonly attribute HTMLFormControlsCollection elements; + //readonly attribute long length; + //getter Element (unsigned long index); + //getter (RadioNodeList or Element) (DOMString name); + + //void submit(); + //void reset(); + //boolean checkValidity(); + //boolean reportValidity(); + + //void requestAutocomplete(); +}; diff --git a/components/script/dom/webidls/HTMLFrameElement.webidl b/components/script/dom/webidls/HTMLFrameElement.webidl new file mode 100644 index 00000000000..effa8d13e99 --- /dev/null +++ b/components/script/dom/webidls/HTMLFrameElement.webidl @@ -0,0 +1,19 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlframeelement +interface HTMLFrameElement : HTMLElement { + // attribute DOMString name; + // attribute DOMString scrolling; + // attribute DOMString src; + // attribute DOMString frameBorder; + // attribute DOMString longDesc; + // attribute boolean noResize; + //readonly attribute Document? contentDocument; + //readonly attribute WindowProxy? contentWindow; + + //[TreatNullAs=EmptyString] attribute DOMString marginHeight; + //[TreatNullAs=EmptyString] attribute DOMString marginWidth; +}; diff --git a/components/script/dom/webidls/HTMLFrameSetElement.webidl b/components/script/dom/webidls/HTMLFrameSetElement.webidl new file mode 100644 index 00000000000..50245baa049 --- /dev/null +++ b/components/script/dom/webidls/HTMLFrameSetElement.webidl @@ -0,0 +1,11 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlframesetelement +interface HTMLFrameSetElement : HTMLElement { + // attribute DOMString cols; + // attribute DOMString rows; +}; +//HTMLFrameSetElement implements WindowEventHandlers; diff --git a/components/script/dom/webidls/HTMLHRElement.webidl b/components/script/dom/webidls/HTMLHRElement.webidl new file mode 100644 index 00000000000..482e1bca516 --- /dev/null +++ b/components/script/dom/webidls/HTMLHRElement.webidl @@ -0,0 +1,18 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlhrelement +interface HTMLHRElement : HTMLElement { + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLHRElement-partial +partial interface HTMLHRElement { + // attribute DOMString align; + // attribute DOMString color; + // attribute boolean noShade; + // attribute DOMString size; + // attribute DOMString width; +}; diff --git a/components/script/dom/webidls/HTMLHeadElement.webidl b/components/script/dom/webidls/HTMLHeadElement.webidl new file mode 100644 index 00000000000..b7a53d2052b --- /dev/null +++ b/components/script/dom/webidls/HTMLHeadElement.webidl @@ -0,0 +1,7 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlheadelement +interface HTMLHeadElement : HTMLElement {}; diff --git a/components/script/dom/webidls/HTMLHeadingElement.webidl b/components/script/dom/webidls/HTMLHeadingElement.webidl new file mode 100644 index 00000000000..21a6060c335 --- /dev/null +++ b/components/script/dom/webidls/HTMLHeadingElement.webidl @@ -0,0 +1,14 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlheadingelement +interface HTMLHeadingElement : HTMLElement { + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLHeadingElement-partial +partial interface HTMLHeadingElement { + // attribute DOMString align; +}; diff --git a/components/script/dom/webidls/HTMLHtmlElement.webidl b/components/script/dom/webidls/HTMLHtmlElement.webidl new file mode 100644 index 00000000000..f48fc6dafac --- /dev/null +++ b/components/script/dom/webidls/HTMLHtmlElement.webidl @@ -0,0 +1,14 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlhtmlelement +interface HTMLHtmlElement : HTMLElement { + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLHtmlElement-partial +partial interface HTMLHtmlElement { + // attribute DOMString version; +}; diff --git a/components/script/dom/webidls/HTMLIFrameElement.webidl b/components/script/dom/webidls/HTMLIFrameElement.webidl new file mode 100644 index 00000000000..201f8700ce4 --- /dev/null +++ b/components/script/dom/webidls/HTMLIFrameElement.webidl @@ -0,0 +1,33 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmliframeelement +interface HTMLIFrameElement : HTMLElement { + attribute DOMString src; + // attribute DOMString srcdoc; + // attribute DOMString name; + //[PutForwards=value] readonly attribute DOMSettableTokenList sandbox; + attribute DOMString sandbox; + // attribute boolean seamless; + // attribute boolean allowFullscreen; + // attribute DOMString width; + // attribute DOMString height; + //readonly attribute Document? contentDocument; + //readonly attribute WindowProxy? contentWindow; + readonly attribute Window? contentWindow; + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLIFrameElement-partial +partial interface HTMLIFrameElement { + // attribute DOMString align; + // attribute DOMString scrolling; + // attribute DOMString frameBorder; + // attribute DOMString longDesc; + + //[TreatNullAs=EmptyString] attribute DOMString marginHeight; + //[TreatNullAs=EmptyString] attribute DOMString marginWidth; +}; diff --git a/components/script/dom/webidls/HTMLImageElement.webidl b/components/script/dom/webidls/HTMLImageElement.webidl new file mode 100644 index 00000000000..08e71ff8ee7 --- /dev/null +++ b/components/script/dom/webidls/HTMLImageElement.webidl @@ -0,0 +1,34 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlimageelement +//[NamedConstructor=Image(optional unsigned long width, optional unsigned long height)] +interface HTMLImageElement : HTMLElement { + attribute DOMString alt; + attribute DOMString src; + // attribute DOMString srcset; + // attribute DOMString crossOrigin; + attribute DOMString useMap; + attribute boolean isMap; + attribute unsigned long width; + attribute unsigned long height; + //readonly attribute unsigned long naturalWidth; + //readonly attribute unsigned long naturalHeight; + //readonly attribute boolean complete; + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLImageElement-partial +partial interface HTMLImageElement { + attribute DOMString name; + // attribute DOMString lowsrc; + attribute DOMString align; + attribute unsigned long hspace; + attribute unsigned long vspace; + attribute DOMString longDesc; + + [TreatNullAs=EmptyString] attribute DOMString border; +}; diff --git a/components/script/dom/webidls/HTMLInputElement.webidl b/components/script/dom/webidls/HTMLInputElement.webidl new file mode 100644 index 00000000000..1caa9137e0b --- /dev/null +++ b/components/script/dom/webidls/HTMLInputElement.webidl @@ -0,0 +1,76 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlinputelement +interface HTMLInputElement : HTMLElement { + // attribute DOMString accept; + // attribute DOMString alt; + // attribute DOMString autocomplete; + // attribute boolean autofocus; + // attribute boolean defaultChecked; + // attribute boolean checked; + // attribute DOMString dirName; + attribute boolean disabled; + //readonly attribute HTMLFormElement? form; + //readonly attribute FileList? files; + // attribute DOMString formAction; + // attribute DOMString formEnctype; + // attribute DOMString formMethod; + // attribute boolean formNoValidate; + // attribute DOMString formTarget; + // attribute unsigned long height; + // attribute boolean indeterminate; + // attribute DOMString inputMode; + //readonly attribute HTMLElement? list; + // attribute DOMString max; + // attribute long maxLength; + // attribute DOMString min; + // attribute long minLength; + // attribute boolean multiple; + // attribute DOMString name; + // attribute DOMString pattern; + // attribute DOMString placeholder; + // attribute boolean readOnly; + // attribute boolean required; + // attribute unsigned long size; + // attribute DOMString src; + // attribute DOMString step; + // attribute DOMString type; + // attribute DOMString defaultValue; + //[TreatNullAs=EmptyString] attribute DOMString value; + // attribute Date? valueAsDate; + // attribute unrestricted double valueAsNumber; + // attribute double valueLow; + // attribute double valueHigh; + // attribute unsigned long width; + + //void stepUp(optional long n = 1); + //void stepDown(optional long n = 1); + + //readonly attribute boolean willValidate; + //readonly attribute ValidityState validity; + //readonly attribute DOMString validationMessage; + //boolean checkValidity(); + //boolean reportValidity(); + //void setCustomValidity(DOMString error); + + //readonly attribute NodeList labels; + + //void select(); + // attribute unsigned long selectionStart; + // attribute unsigned long selectionEnd; + // attribute DOMString selectionDirection; + //void setRangeText(DOMString replacement); + //void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); + //void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLInputElement-partial +partial interface HTMLInputElement { + // attribute DOMString align; + // attribute DOMString useMap; +}; diff --git a/components/script/dom/webidls/HTMLLIElement.webidl b/components/script/dom/webidls/HTMLLIElement.webidl new file mode 100644 index 00000000000..87d8b78b175 --- /dev/null +++ b/components/script/dom/webidls/HTMLLIElement.webidl @@ -0,0 +1,16 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmllielement +interface HTMLLIElement : HTMLElement { + // attribute long value; + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLLIElement-partial +partial interface HTMLLIElement { + // attribute DOMString type; +}; diff --git a/components/script/dom/webidls/HTMLLabelElement.webidl b/components/script/dom/webidls/HTMLLabelElement.webidl new file mode 100644 index 00000000000..c3ff7fb50cd --- /dev/null +++ b/components/script/dom/webidls/HTMLLabelElement.webidl @@ -0,0 +1,11 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmllabelelement +interface HTMLLabelElement : HTMLElement { + //readonly attribute HTMLFormElement? form; + // attribute DOMString htmlFor; + //readonly attribute HTMLElement? control; +}; diff --git a/components/script/dom/webidls/HTMLLegendElement.webidl b/components/script/dom/webidls/HTMLLegendElement.webidl new file mode 100644 index 00000000000..3622cd27672 --- /dev/null +++ b/components/script/dom/webidls/HTMLLegendElement.webidl @@ -0,0 +1,16 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmllegendelement +interface HTMLLegendElement : HTMLElement { + //readonly attribute HTMLFormElement? form; + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLLegendElement-partial +partial interface HTMLLegendElement { + // attribute DOMString align; +}; diff --git a/components/script/dom/webidls/HTMLLinkElement.webidl b/components/script/dom/webidls/HTMLLinkElement.webidl new file mode 100644 index 00000000000..3757bada2b3 --- /dev/null +++ b/components/script/dom/webidls/HTMLLinkElement.webidl @@ -0,0 +1,26 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmllinkelement +interface HTMLLinkElement : HTMLElement { + // attribute DOMString href; + // attribute DOMString crossOrigin; + // attribute DOMString rel; + //readonly attribute DOMTokenList relList; + // attribute DOMString media; + // attribute DOMString hreflang; + // attribute DOMString type; + //[PutForwards=value] readonly attribute DOMSettableTokenList sizes; + + // also has obsolete members +}; +//HTMLLinkElement implements LinkStyle; + +// http://www.whatwg.org/html/#HTMLLinkElement-partial +partial interface HTMLLinkElement { + // attribute DOMString charset; + // attribute DOMString rev; + // attribute DOMString target; +}; diff --git a/components/script/dom/webidls/HTMLMapElement.webidl b/components/script/dom/webidls/HTMLMapElement.webidl new file mode 100644 index 00000000000..c5eb1cea3e4 --- /dev/null +++ b/components/script/dom/webidls/HTMLMapElement.webidl @@ -0,0 +1,11 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlmapelement +interface HTMLMapElement : HTMLElement { + // attribute DOMString name; + //readonly attribute HTMLCollection areas; + //readonly attribute HTMLCollection images; +}; diff --git a/components/script/dom/webidls/HTMLMediaElement.webidl b/components/script/dom/webidls/HTMLMediaElement.webidl new file mode 100644 index 00000000000..53f5770f54f --- /dev/null +++ b/components/script/dom/webidls/HTMLMediaElement.webidl @@ -0,0 +1,67 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlmediaelement +//enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" }; +interface HTMLMediaElement : HTMLElement { + + // error state + //readonly attribute MediaError? error; + + // network state + // attribute DOMString src; + //readonly attribute DOMString currentSrc; + // attribute DOMString crossOrigin; + //const unsigned short NETWORK_EMPTY = 0; + //const unsigned short NETWORK_IDLE = 1; + //const unsigned short NETWORK_LOADING = 2; + //const unsigned short NETWORK_NO_SOURCE = 3; + //readonly attribute unsigned short networkState; + // attribute DOMString preload; + //readonly attribute TimeRanges buffered; + //void load(); + //CanPlayTypeResult canPlayType(DOMString type); + + // ready state + //const unsigned short HAVE_NOTHING = 0; + //const unsigned short HAVE_METADATA = 1; + //const unsigned short HAVE_CURRENT_DATA = 2; + //const unsigned short HAVE_FUTURE_DATA = 3; + //const unsigned short HAVE_ENOUGH_DATA = 4; + //readonly attribute unsigned short readyState; + //readonly attribute boolean seeking; + + // playback state + // attribute double currentTime; + //void fastSeek(double time); + //readonly attribute unrestricted double duration; + //Date getStartDate(); + //readonly attribute boolean paused; + // attribute double defaultPlaybackRate; + // attribute double playbackRate; + //readonly attribute TimeRanges played; + //readonly attribute TimeRanges seekable; + //readonly attribute boolean ended; + // attribute boolean autoplay; + // attribute boolean loop; + //void play(); + //void pause(); + + // media controller + // attribute DOMString mediaGroup; + // attribute MediaController? controller; + + // controls + // attribute boolean controls; + // attribute double volume; + // attribute boolean muted; + // attribute boolean defaultMuted; + + // tracks + //readonly attribute AudioTrackList audioTracks; + //readonly attribute VideoTrackList videoTracks; + //readonly attribute TextTrackList textTracks; + //TextTrack addTextTrack(TextTrackKind kind, optional DOMString label = "", optional DOMString language = ""); +}; diff --git a/components/script/dom/webidls/HTMLMetaElement.webidl b/components/script/dom/webidls/HTMLMetaElement.webidl new file mode 100644 index 00000000000..97f89b35576 --- /dev/null +++ b/components/script/dom/webidls/HTMLMetaElement.webidl @@ -0,0 +1,18 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlmetaelement +interface HTMLMetaElement : HTMLElement { + // attribute DOMString name; + // attribute DOMString httpEquiv; + // attribute DOMString content; + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLMetaElement-partial +partial interface HTMLMetaElement { + // attribute DOMString scheme; +}; diff --git a/components/script/dom/webidls/HTMLMeterElement.webidl b/components/script/dom/webidls/HTMLMeterElement.webidl new file mode 100644 index 00000000000..96c40ba6114 --- /dev/null +++ b/components/script/dom/webidls/HTMLMeterElement.webidl @@ -0,0 +1,15 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlmeterelement +interface HTMLMeterElement : HTMLElement { + // attribute double value; + // attribute double min; + // attribute double max; + // attribute double low; + // attribute double high; + // attribute double optimum; + //readonly attribute NodeList labels; +}; diff --git a/components/script/dom/webidls/HTMLModElement.webidl b/components/script/dom/webidls/HTMLModElement.webidl new file mode 100644 index 00000000000..3f8f0e62638 --- /dev/null +++ b/components/script/dom/webidls/HTMLModElement.webidl @@ -0,0 +1,10 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlmodelement +interface HTMLModElement : HTMLElement { + // attribute DOMString cite; + // attribute DOMString dateTime; +}; diff --git a/components/script/dom/webidls/HTMLOListElement.webidl b/components/script/dom/webidls/HTMLOListElement.webidl new file mode 100644 index 00000000000..9f9f654acc5 --- /dev/null +++ b/components/script/dom/webidls/HTMLOListElement.webidl @@ -0,0 +1,18 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlolistelement +interface HTMLOListElement : HTMLElement { + // attribute boolean reversed; + // attribute long start; + // attribute DOMString type; + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLOListElement-partial +partial interface HTMLOListElement { + // attribute boolean compact; +}; diff --git a/components/script/dom/webidls/HTMLObjectElement.webidl b/components/script/dom/webidls/HTMLObjectElement.webidl new file mode 100644 index 00000000000..56fc290e546 --- /dev/null +++ b/components/script/dom/webidls/HTMLObjectElement.webidl @@ -0,0 +1,44 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlobjectelement +interface HTMLObjectElement : HTMLElement { + // attribute DOMString data; + // attribute DOMString type; + // attribute boolean typeMustMatch; + // attribute DOMString name; + // attribute DOMString useMap; + //readonly attribute HTMLFormElement? form; + // attribute DOMString width; + // attribute DOMString height; + //readonly attribute Document? contentDocument; + //readonly attribute WindowProxy? contentWindow; + + //readonly attribute boolean willValidate; + readonly attribute ValidityState validity; + //readonly attribute DOMString validationMessage; + //boolean checkValidity(); + //boolean reportValidity(); + //void setCustomValidity(DOMString error); + + //legacycaller any (any... arguments); + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLObjectElement-partial +partial interface HTMLObjectElement { + // attribute DOMString align; + // attribute DOMString archive; + // attribute DOMString code; + // attribute boolean declare; + // attribute unsigned long hspace; + // attribute DOMString standby; + // attribute unsigned long vspace; + // attribute DOMString codeBase; + // attribute DOMString codeType; + + //[TreatNullAs=EmptyString] attribute DOMString border; +}; diff --git a/components/script/dom/webidls/HTMLOptGroupElement.webidl b/components/script/dom/webidls/HTMLOptGroupElement.webidl new file mode 100644 index 00000000000..13646f00ab1 --- /dev/null +++ b/components/script/dom/webidls/HTMLOptGroupElement.webidl @@ -0,0 +1,10 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmloptgroupelement +interface HTMLOptGroupElement : HTMLElement { + attribute boolean disabled; + // attribute DOMString label; +}; diff --git a/components/script/dom/webidls/HTMLOptionElement.webidl b/components/script/dom/webidls/HTMLOptionElement.webidl new file mode 100644 index 00000000000..7855449c6f4 --- /dev/null +++ b/components/script/dom/webidls/HTMLOptionElement.webidl @@ -0,0 +1,18 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmloptionelement +//[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; + // attribute DOMString label; + // attribute boolean defaultSelected; + // attribute boolean selected; + // attribute DOMString value; + + // attribute DOMString text; + //readonly attribute long index; +}; diff --git a/components/script/dom/webidls/HTMLOutputElement.webidl b/components/script/dom/webidls/HTMLOutputElement.webidl new file mode 100644 index 00000000000..d0d23d87d42 --- /dev/null +++ b/components/script/dom/webidls/HTMLOutputElement.webidl @@ -0,0 +1,24 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmloutputelement +interface HTMLOutputElement : HTMLElement { + //[PutForwards=value] readonly attribute DOMSettableTokenList htmlFor; + //readonly attribute HTMLFormElement? form; + // attribute DOMString name; + + //readonly attribute DOMString type; + // attribute DOMString defaultValue; + // attribute DOMString value; + + //readonly attribute boolean willValidate; + readonly attribute ValidityState validity; + //readonly attribute DOMString validationMessage; + //boolean checkValidity(); + //boolean reportValidity(); + //void setCustomValidity(DOMString error); + + //readonly attribute NodeList labels; +}; diff --git a/components/script/dom/webidls/HTMLParagraphElement.webidl b/components/script/dom/webidls/HTMLParagraphElement.webidl new file mode 100644 index 00000000000..86cae7cbe87 --- /dev/null +++ b/components/script/dom/webidls/HTMLParagraphElement.webidl @@ -0,0 +1,14 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlparagraphelement +interface HTMLParagraphElement : HTMLElement { + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLParagraphElement-partial +partial interface HTMLParagraphElement { + // attribute DOMString align; +}; diff --git a/components/script/dom/webidls/HTMLParamElement.webidl b/components/script/dom/webidls/HTMLParamElement.webidl new file mode 100644 index 00000000000..afcb6ec1d9b --- /dev/null +++ b/components/script/dom/webidls/HTMLParamElement.webidl @@ -0,0 +1,18 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlparamelement +interface HTMLParamElement : HTMLElement { + // attribute DOMString name; + // attribute DOMString value; + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLParamElement-partial +partial interface HTMLParamElement { + // attribute DOMString type; + // attribute DOMString valueType; +}; diff --git a/components/script/dom/webidls/HTMLPreElement.webidl b/components/script/dom/webidls/HTMLPreElement.webidl new file mode 100644 index 00000000000..f0498ebd32c --- /dev/null +++ b/components/script/dom/webidls/HTMLPreElement.webidl @@ -0,0 +1,14 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlpreelement +interface HTMLPreElement : HTMLElement { + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLPreElement-partial +partial interface HTMLPreElement { + // attribute long width; +}; diff --git a/components/script/dom/webidls/HTMLProgressElement.webidl b/components/script/dom/webidls/HTMLProgressElement.webidl new file mode 100644 index 00000000000..53a95297afb --- /dev/null +++ b/components/script/dom/webidls/HTMLProgressElement.webidl @@ -0,0 +1,12 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlprogresselement +interface HTMLProgressElement : HTMLElement { + // attribute double value; + // attribute double max; + //readonly attribute double position; + //readonly attribute NodeList labels; +}; diff --git a/components/script/dom/webidls/HTMLQuoteElement.webidl b/components/script/dom/webidls/HTMLQuoteElement.webidl new file mode 100644 index 00000000000..a7b1ae41276 --- /dev/null +++ b/components/script/dom/webidls/HTMLQuoteElement.webidl @@ -0,0 +1,9 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlquoteelement +interface HTMLQuoteElement : HTMLElement { + // attribute DOMString cite; +}; diff --git a/components/script/dom/webidls/HTMLScriptElement.webidl b/components/script/dom/webidls/HTMLScriptElement.webidl new file mode 100644 index 00000000000..260850fa78c --- /dev/null +++ b/components/script/dom/webidls/HTMLScriptElement.webidl @@ -0,0 +1,25 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlscriptelement +interface HTMLScriptElement : HTMLElement { + // attribute DOMString src; + readonly attribute DOMString src; + // attribute DOMString type; + // attribute DOMString charset; + // attribute boolean async; + // attribute boolean defer; + // attribute DOMString crossOrigin; + [Pure] + attribute DOMString text; + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLScriptElement-partial +partial interface HTMLScriptElement { + // attribute DOMString event; + // attribute DOMString htmlFor; +}; diff --git a/components/script/dom/webidls/HTMLSelectElement.webidl b/components/script/dom/webidls/HTMLSelectElement.webidl new file mode 100644 index 00000000000..91d4c3b0917 --- /dev/null +++ b/components/script/dom/webidls/HTMLSelectElement.webidl @@ -0,0 +1,40 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlselectelement +interface HTMLSelectElement : HTMLElement { + // attribute boolean autofocus; + attribute boolean disabled; + //readonly attribute HTMLFormElement? form; + // attribute boolean multiple; + // attribute DOMString name; + // attribute boolean required; + // attribute unsigned long size; + + //readonly attribute DOMString type; + + //readonly attribute HTMLOptionsCollection options; + // attribute unsigned long length; + //getter Element? item(unsigned long index); + //HTMLOptionElement? namedItem(DOMString name); + // Note: this function currently only exists for test_union.html. + void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); + //void remove(); // ChildNode overload + //void remove(long index); + //setter creator void (unsigned long index, HTMLOptionElement? option); + + //readonly attribute HTMLCollection selectedOptions; + // attribute long selectedIndex; + // attribute DOMString value; + + //readonly attribute boolean willValidate; + readonly attribute ValidityState validity; + //readonly attribute DOMString validationMessage; + //boolean checkValidity(); + //boolean reportValidity(); + //void setCustomValidity(DOMString error); + + //readonly attribute NodeList labels; +}; diff --git a/components/script/dom/webidls/HTMLSourceElement.webidl b/components/script/dom/webidls/HTMLSourceElement.webidl new file mode 100644 index 00000000000..6739f1cd0c1 --- /dev/null +++ b/components/script/dom/webidls/HTMLSourceElement.webidl @@ -0,0 +1,10 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlsourceelement +interface HTMLSourceElement : HTMLElement { + // attribute DOMString src; + // attribute DOMString type; +}; diff --git a/components/script/dom/webidls/HTMLSpanElement.webidl b/components/script/dom/webidls/HTMLSpanElement.webidl new file mode 100644 index 00000000000..ab7ac3edc85 --- /dev/null +++ b/components/script/dom/webidls/HTMLSpanElement.webidl @@ -0,0 +1,7 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlspanelement +interface HTMLSpanElement : HTMLElement {}; diff --git a/components/script/dom/webidls/HTMLStyleElement.webidl b/components/script/dom/webidls/HTMLStyleElement.webidl new file mode 100644 index 00000000000..0dd71a58769 --- /dev/null +++ b/components/script/dom/webidls/HTMLStyleElement.webidl @@ -0,0 +1,12 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlstyleelement +interface HTMLStyleElement : HTMLElement { + // attribute DOMString media; + // attribute DOMString type; + // attribute boolean scoped; +}; +//HTMLStyleElement implements LinkStyle; diff --git a/components/script/dom/webidls/HTMLTableCaptionElement.webidl b/components/script/dom/webidls/HTMLTableCaptionElement.webidl new file mode 100644 index 00000000000..7ab036c8eb1 --- /dev/null +++ b/components/script/dom/webidls/HTMLTableCaptionElement.webidl @@ -0,0 +1,14 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltablecaptionelement +interface HTMLTableCaptionElement : HTMLElement { + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLTableCaptionElement-partial +partial interface HTMLTableCaptionElement { + // attribute DOMString align; +}; diff --git a/components/script/dom/webidls/HTMLTableCellElement.webidl b/components/script/dom/webidls/HTMLTableCellElement.webidl new file mode 100644 index 00000000000..131bf02b5bc --- /dev/null +++ b/components/script/dom/webidls/HTMLTableCellElement.webidl @@ -0,0 +1,29 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltablecellelement +interface HTMLTableCellElement : HTMLElement { + // attribute unsigned long colSpan; + // attribute unsigned long rowSpan; + //[PutForwards=value] readonly attribute DOMSettableTokenList headers; + //readonly attribute long cellIndex; + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLTableCellElement-partial +partial interface HTMLTableCellElement { + // attribute DOMString align; + // attribute DOMString axis; + // attribute DOMString height; + // attribute DOMString width; + + // attribute DOMString ch; + // attribute DOMString chOff; + // attribute boolean noWrap; + // attribute DOMString vAlign; + + //[TreatNullAs=EmptyString] attribute DOMString bgColor; +}; diff --git a/components/script/dom/webidls/HTMLTableColElement.webidl b/components/script/dom/webidls/HTMLTableColElement.webidl new file mode 100644 index 00000000000..5a7cfc4b5c4 --- /dev/null +++ b/components/script/dom/webidls/HTMLTableColElement.webidl @@ -0,0 +1,20 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltablecolelement +interface HTMLTableColElement : HTMLElement { + // attribute unsigned long span; + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLTableColElement-partial +partial interface HTMLTableColElement { + // attribute DOMString align; + // attribute DOMString ch; + // attribute DOMString chOff; + // attribute DOMString vAlign; + // attribute DOMString width; +}; diff --git a/components/script/dom/webidls/HTMLTableDataCellElement.webidl b/components/script/dom/webidls/HTMLTableDataCellElement.webidl new file mode 100644 index 00000000000..62669ae026a --- /dev/null +++ b/components/script/dom/webidls/HTMLTableDataCellElement.webidl @@ -0,0 +1,14 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltabledatacellelement +interface HTMLTableDataCellElement : HTMLTableCellElement { + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLTableDataCellElement-partial +partial interface HTMLTableDataCellElement { + // attribute DOMString abbr; +}; diff --git a/components/script/dom/webidls/HTMLTableElement.webidl b/components/script/dom/webidls/HTMLTableElement.webidl new file mode 100644 index 00000000000..d71a38c12a5 --- /dev/null +++ b/components/script/dom/webidls/HTMLTableElement.webidl @@ -0,0 +1,40 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltableelement +interface HTMLTableElement : HTMLElement { + attribute HTMLTableCaptionElement? caption; + //HTMLElement createCaption(); + //void deleteCaption(); + // attribute HTMLTableSectionElement? tHead; + //HTMLElement createTHead(); + //void deleteTHead(); + // attribute HTMLTableSectionElement? tFoot; + //HTMLElement createTFoot(); + //void deleteTFoot(); + //readonly attribute HTMLCollection tBodies; + //HTMLElement createTBody(); + //readonly attribute HTMLCollection rows; + //HTMLElement insertRow(optional long index = -1); + //void deleteRow(long index); + // attribute boolean sortable; + //void stopSorting(); + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLTableElement-partial +partial interface HTMLTableElement { + // attribute DOMString align; + // attribute DOMString border; + // attribute DOMString frame; + // attribute DOMString rules; + // attribute DOMString summary; + // attribute DOMString width; + + //[TreatNullAs=EmptyString] attribute DOMString bgColor; + //[TreatNullAs=EmptyString] attribute DOMString cellPadding; + //[TreatNullAs=EmptyString] attribute DOMString cellSpacing; +}; diff --git a/components/script/dom/webidls/HTMLTableHeaderCellElement.webidl b/components/script/dom/webidls/HTMLTableHeaderCellElement.webidl new file mode 100644 index 00000000000..9bbf4d6f436 --- /dev/null +++ b/components/script/dom/webidls/HTMLTableHeaderCellElement.webidl @@ -0,0 +1,12 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltableheadercellelement +interface HTMLTableHeaderCellElement : HTMLTableCellElement { + // attribute DOMString scope; + // attribute DOMString abbr; + // attribute DOMString sorted; + //void sort(); +}; diff --git a/components/script/dom/webidls/HTMLTableRowElement.webidl b/components/script/dom/webidls/HTMLTableRowElement.webidl new file mode 100644 index 00000000000..7cacb013936 --- /dev/null +++ b/components/script/dom/webidls/HTMLTableRowElement.webidl @@ -0,0 +1,25 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltablerowelement +interface HTMLTableRowElement : HTMLElement { + //readonly attribute long rowIndex; + //readonly attribute long sectionRowIndex; + //readonly attribute HTMLCollection cells; + //HTMLElement insertCell(optional long index = -1); + //void deleteCell(long index); + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLTableRowElement-partial +partial interface HTMLTableRowElement { + // attribute DOMString align; + // attribute DOMString ch; + // attribute DOMString chOff; + // attribute DOMString vAlign; + + //[TreatNullAs=EmptyString] attribute DOMString bgColor; +}; diff --git a/components/script/dom/webidls/HTMLTableSectionElement.webidl b/components/script/dom/webidls/HTMLTableSectionElement.webidl new file mode 100644 index 00000000000..c3909f3f3e0 --- /dev/null +++ b/components/script/dom/webidls/HTMLTableSectionElement.webidl @@ -0,0 +1,21 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltablesectionelement +interface HTMLTableSectionElement : HTMLElement { + //readonly attribute HTMLCollection rows; + //HTMLElement insertRow(optional long index = -1); + //void deleteRow(long index); + + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLTableSectionElement-partial +partial interface HTMLTableSectionElement { + // attribute DOMString align; + // attribute DOMString ch; + // attribute DOMString chOff; + // attribute DOMString vAlign; +}; diff --git a/components/script/dom/webidls/HTMLTemplateElement.webidl b/components/script/dom/webidls/HTMLTemplateElement.webidl new file mode 100644 index 00000000000..e148dfe2236 --- /dev/null +++ b/components/script/dom/webidls/HTMLTemplateElement.webidl @@ -0,0 +1,9 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltemplateelement +interface HTMLTemplateElement : HTMLElement { + //readonly attribute DocumentFragment content; +}; diff --git a/components/script/dom/webidls/HTMLTextAreaElement.webidl b/components/script/dom/webidls/HTMLTextAreaElement.webidl new file mode 100644 index 00000000000..534bb87a0e5 --- /dev/null +++ b/components/script/dom/webidls/HTMLTextAreaElement.webidl @@ -0,0 +1,45 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltextareaelement +interface HTMLTextAreaElement : HTMLElement { + // attribute DOMString autocomplete; + // attribute boolean autofocus; + // attribute unsigned long cols; + // attribute DOMString dirName; + attribute boolean disabled; + //readonly attribute HTMLFormElement? form; + // attribute DOMString inputMode; + // attribute long maxLength; + // attribute long minLength; + // attribute DOMString name; + // attribute DOMString placeholder; + // attribute boolean readOnly; + // attribute boolean required; + // attribute unsigned long rows; + // attribute DOMString wrap; + + //readonly attribute DOMString type; + // attribute DOMString defaultValue; + //[TreatNullAs=EmptyString] attribute DOMString value; + //readonly attribute unsigned long textLength; + + //readonly attribute boolean willValidate; + //readonly attribute ValidityState validity; + //readonly attribute DOMString validationMessage; + //boolean checkValidity(); + //boolean reportValidity(); + //void setCustomValidity(DOMString error); + + //readonly attribute NodeList labels; + + //void select(); + // attribute unsigned long selectionStart; + // attribute unsigned long selectionEnd; + // attribute DOMString selectionDirection; + //void setRangeText(DOMString replacement); + //void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); + //void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); +}; diff --git a/components/script/dom/webidls/HTMLTimeElement.webidl b/components/script/dom/webidls/HTMLTimeElement.webidl new file mode 100644 index 00000000000..20ab9b04556 --- /dev/null +++ b/components/script/dom/webidls/HTMLTimeElement.webidl @@ -0,0 +1,9 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltimeelement +interface HTMLTimeElement : HTMLElement { + // attribute DOMString dateTime; +}; diff --git a/components/script/dom/webidls/HTMLTitleElement.webidl b/components/script/dom/webidls/HTMLTitleElement.webidl new file mode 100644 index 00000000000..789fba3cf17 --- /dev/null +++ b/components/script/dom/webidls/HTMLTitleElement.webidl @@ -0,0 +1,10 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltitleelement +interface HTMLTitleElement : HTMLElement { + [Pure] + attribute DOMString text; +}; diff --git a/components/script/dom/webidls/HTMLTrackElement.webidl b/components/script/dom/webidls/HTMLTrackElement.webidl new file mode 100644 index 00000000000..bab698709ab --- /dev/null +++ b/components/script/dom/webidls/HTMLTrackElement.webidl @@ -0,0 +1,21 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmltrackelement +interface HTMLTrackElement : HTMLElement { + // attribute DOMString kind; + // attribute DOMString src; + // attribute DOMString srclang; + // attribute DOMString label; + // attribute boolean default; + + //const unsigned short NONE = 0; + //const unsigned short LOADING = 1; + //const unsigned short LOADED = 2; + //const unsigned short ERROR = 3; + //readonly attribute unsigned short readyState; + + //readonly attribute TextTrack track; +}; diff --git a/components/script/dom/webidls/HTMLUListElement.webidl b/components/script/dom/webidls/HTMLUListElement.webidl new file mode 100644 index 00000000000..10c6451d4c7 --- /dev/null +++ b/components/script/dom/webidls/HTMLUListElement.webidl @@ -0,0 +1,15 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlulistelement +interface HTMLUListElement : HTMLElement { + // also has obsolete members +}; + +// http://www.whatwg.org/html/#HTMLUListElement-partial +partial interface HTMLUListElement { + // attribute boolean compact; + // attribute DOMString type; +}; diff --git a/components/script/dom/webidls/HTMLUnknownElement.webidl b/components/script/dom/webidls/HTMLUnknownElement.webidl new file mode 100644 index 00000000000..db1307ae714 --- /dev/null +++ b/components/script/dom/webidls/HTMLUnknownElement.webidl @@ -0,0 +1,16 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://www.whatwg.org/specs/web-apps/current-work/ and + * http://dev.w3.org/csswg/cssom-view/ + * + * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and + * Opera Software ASA. You are granted a license to use, reproduce + * and create derivative works of this document. + */ + +interface HTMLUnknownElement : HTMLElement { +}; diff --git a/components/script/dom/webidls/HTMLVideoElement.webidl b/components/script/dom/webidls/HTMLVideoElement.webidl new file mode 100644 index 00000000000..9d5d02cc530 --- /dev/null +++ b/components/script/dom/webidls/HTMLVideoElement.webidl @@ -0,0 +1,13 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#htmlvideoelement +interface HTMLVideoElement : HTMLMediaElement { + // attribute unsigned long width; + // attribute unsigned long height; + //readonly attribute unsigned long videoWidth; + //readonly attribute unsigned long videoHeight; + // attribute DOMString poster; +}; diff --git a/components/script/dom/webidls/Location.webidl b/components/script/dom/webidls/Location.webidl new file mode 100644 index 00000000000..99076988122 --- /dev/null +++ b/components/script/dom/webidls/Location.webidl @@ -0,0 +1,12 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#location +/*[Unforgeable]*/ interface Location { + //void assign(DOMString url); + //void replace(DOMString url); + //void reload(); +}; +Location implements URLUtils; diff --git a/components/script/dom/webidls/MessageEvent.webidl b/components/script/dom/webidls/MessageEvent.webidl new file mode 100644 index 00000000000..7198708499e --- /dev/null +++ b/components/script/dom/webidls/MessageEvent.webidl @@ -0,0 +1,23 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#messageevent +[Constructor(DOMString type, optional MessageEventInit eventInitDict)/*, Exposed=Window,Worker*/] +interface MessageEvent : Event { + readonly attribute any data; + readonly attribute DOMString origin; + readonly attribute DOMString lastEventId; + //readonly attribute (WindowProxy or MessagePort)? source; + //readonly attribute MessagePort[]? ports; +}; + +dictionary MessageEventInit : EventInit { + any data = null; + DOMString origin = ""; + DOMString lastEventId = ""; + //DOMString channel; + //(WindowProxy or MessagePort)? source; + //sequence<MessagePort> ports; +}; diff --git a/components/script/dom/webidls/MouseEvent.webidl b/components/script/dom/webidls/MouseEvent.webidl new file mode 100644 index 00000000000..cdef58228c1 --- /dev/null +++ b/components/script/dom/webidls/MouseEvent.webidl @@ -0,0 +1,43 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-MouseEvent +[Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict)] +interface MouseEvent : UIEvent { + readonly attribute long screenX; + readonly attribute long screenY; + readonly attribute long clientX; + readonly attribute long clientY; + readonly attribute boolean ctrlKey; + readonly attribute boolean shiftKey; + readonly attribute boolean altKey; + readonly attribute boolean metaKey; + readonly attribute short button; + readonly attribute EventTarget? relatedTarget; + // Introduced in DOM Level 3 + //readonly attribute unsigned short buttons; + //boolean getModifierState (DOMString keyArg); +}; + +// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-MouseEventInit +dictionary MouseEventInit : UIEventInit { + long screenX = 0; + long screenY = 0; + long clientX = 0; + long clientY = 0; + boolean ctrlKey = false; + boolean shiftKey = false; + boolean altKey = false; + boolean metaKey = false; + short button = 0; + //unsigned short buttons = 0; + EventTarget? relatedTarget = null; +}; + +// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-MouseEvent-1 +partial interface MouseEvent { + // Deprecated in DOM Level 3 + void initMouseEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, boolean ctrlKeyArg, boolean altKeyArg, boolean shiftKeyArg, boolean metaKeyArg, short buttonArg, EventTarget? relatedTargetArg); +}; diff --git a/components/script/dom/webidls/NamedNodeMap.webidl b/components/script/dom/webidls/NamedNodeMap.webidl new file mode 100644 index 00000000000..636c4a2782f --- /dev/null +++ b/components/script/dom/webidls/NamedNodeMap.webidl @@ -0,0 +1,8 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +interface NamedNodeMap { + readonly attribute unsigned long length; + getter Attr? item(unsigned long index); +}; diff --git a/components/script/dom/webidls/Navigator.webidl b/components/script/dom/webidls/Navigator.webidl new file mode 100644 index 00000000000..16d96d53470 --- /dev/null +++ b/components/script/dom/webidls/Navigator.webidl @@ -0,0 +1,27 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#navigator +interface Navigator { + // objects implementing this interface also implement the interfaces given below +}; +Navigator implements NavigatorID; +//Navigator implements NavigatorLanguage; +//Navigator implements NavigatorOnLine; +//Navigator implements NavigatorContentUtils; +//Navigator implements NavigatorStorageUtils; +//Navigator implements NavigatorPlugins; + +// http://www.whatwg.org/html/#navigatorid +[NoInterfaceObject/*, Exposed=Window,Worker*/] +interface NavigatorID { + readonly attribute DOMString appCodeName; // constant "Mozilla" + readonly attribute DOMString appName; + //readonly attribute DOMString appVersion; + readonly attribute DOMString platform; + readonly attribute DOMString product; // constant "Gecko" + boolean taintEnabled(); // constant false + //readonly attribute DOMString userAgent; +}; diff --git a/components/script/dom/webidls/Node.webidl b/components/script/dom/webidls/Node.webidl new file mode 100644 index 00000000000..3297b2c3ab1 --- /dev/null +++ b/components/script/dom/webidls/Node.webidl @@ -0,0 +1,79 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is: + * http://dom.spec.whatwg.org/#interface-node + */ + +interface Node : EventTarget { + const unsigned short ELEMENT_NODE = 1; + const unsigned short ATTRIBUTE_NODE = 2; // historical + const unsigned short TEXT_NODE = 3; + const unsigned short CDATA_SECTION_NODE = 4; // historical + const unsigned short ENTITY_REFERENCE_NODE = 5; // historical + const unsigned short ENTITY_NODE = 6; // historical + const unsigned short PROCESSING_INSTRUCTION_NODE = 7; + const unsigned short COMMENT_NODE = 8; + const unsigned short DOCUMENT_NODE = 9; + const unsigned short DOCUMENT_TYPE_NODE = 10; + const unsigned short DOCUMENT_FRAGMENT_NODE = 11; + const unsigned short NOTATION_NODE = 12; // historical + [Constant] + readonly attribute unsigned short nodeType; + [Pure] + readonly attribute DOMString nodeName; + + [Pure] + readonly attribute DOMString? baseURI; + + [Pure] + readonly attribute Document? ownerDocument; + [Pure] + readonly attribute Node? parentNode; + [Pure] + readonly attribute Element? parentElement; + boolean hasChildNodes(); + [Constant] + readonly attribute NodeList childNodes; + [Pure] + readonly attribute Node? firstChild; + [Pure] + readonly attribute Node? lastChild; + [Pure] + readonly attribute Node? previousSibling; + [Pure] + readonly attribute Node? nextSibling; + + [Pure] + attribute DOMString? nodeValue; + [Pure] + attribute DOMString? textContent; + void normalize(); + + Node cloneNode(optional boolean deep = true); + boolean isEqualNode(Node? node); + + const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01; + const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02; + const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04; + const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08; + const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10; + const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; + unsigned short compareDocumentPosition(Node other); + boolean contains(Node? other); + + DOMString? lookupPrefix(DOMString? namespace); + DOMString? lookupNamespaceURI(DOMString? prefix); + boolean isDefaultNamespace(DOMString? namespace); + + [Throws] + Node insertBefore(Node node, Node? child); + [Throws] + Node appendChild(Node node); + [Throws] + Node replaceChild(Node node, Node child); + [Throws] + Node removeChild(Node child); +}; diff --git a/components/script/dom/webidls/NodeFilter.webidl b/components/script/dom/webidls/NodeFilter.webidl new file mode 100644 index 00000000000..b84b369829e --- /dev/null +++ b/components/script/dom/webidls/NodeFilter.webidl @@ -0,0 +1,33 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/#interface-nodefilter + */ +// Import form http://hg.mozilla.org/mozilla-central/file/a5a720259d79/dom/webidl/NodeFilter.webidl + +callback interface NodeFilter { + // Constants for acceptNode() + // const unsigned short FILTER_ACCEPT = 1; + // const unsigned short FILTER_REJECT = 2; + // const unsigned short FILTER_SKIP = 3; + + // Constants for whatToShow + // const unsigned long SHOW_ALL = 0xFFFFFFFF; + // const unsigned long SHOW_ELEMENT = 0x1; + // const unsigned long SHOW_ATTRIBUTE = 0x2; // historical + // const unsigned long SHOW_TEXT = 0x4; + // const unsigned long SHOW_CDATA_SECTION = 0x8; // historical + // const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical + // const unsigned long SHOW_ENTITY = 0x20; // historical + // const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40; + // const unsigned long SHOW_COMMENT = 0x80; + // const unsigned long SHOW_DOCUMENT = 0x100; + // const unsigned long SHOW_DOCUMENT_TYPE = 0x200; + // const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400; + // const unsigned long SHOW_NOTATION = 0x800; // historical + + unsigned short acceptNode(Node node); +}; diff --git a/components/script/dom/webidls/NodeIterator.webidl b/components/script/dom/webidls/NodeIterator.webidl new file mode 100644 index 00000000000..6eb684dd9f9 --- /dev/null +++ b/components/script/dom/webidls/NodeIterator.webidl @@ -0,0 +1,32 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://www.w3.org/TR/2012/WD-dom-20120105/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ +// Import from http://hg.mozilla.org/mozilla-central/raw-file/a5a720259d79/dom/webidl/NodeIterator.webidl + +interface NodeIterator { + // [Constant] + // readonly attribute Node root; + // [Pure] + // readonly attribute Node? referenceNode; + // [Pure] + // readonly attribute boolean pointerBeforeReferenceNode; + // [Constant] + // readonly attribute unsigned long whatToShow; + // [Constant] + // readonly attribute NodeFilter? filter; + + // [Throws] + // Node? nextNode(); + // [Throws] + // Node? previousNode(); + + // void detach(); +}; diff --git a/components/script/dom/webidls/NodeList.webidl b/components/script/dom/webidls/NodeList.webidl new file mode 100644 index 00000000000..9773f8efcef --- /dev/null +++ b/components/script/dom/webidls/NodeList.webidl @@ -0,0 +1,13 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is: + * http://dom.spec.whatwg.org/#interface-nodelist + */ + +interface NodeList { + readonly attribute unsigned long length; + getter Node? item(unsigned long index); +}; diff --git a/components/script/dom/webidls/ParentNode.webidl b/components/script/dom/webidls/ParentNode.webidl new file mode 100644 index 00000000000..daa4339611f --- /dev/null +++ b/components/script/dom/webidls/ParentNode.webidl @@ -0,0 +1,34 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/#interface-parentnode + */ + +[NoInterfaceObject] +interface ParentNode { + [Constant] + readonly attribute HTMLCollection children; + /* + [Pure] + readonly attribute Element? firstElementChild; + [Pure] + readonly attribute Element? lastElementChild; + [Pure] + readonly attribute unsigned long childElementCount; + */ + // Not implemented yet + // void prepend((Node or DOMString)... nodes); + // void append((Node or DOMString)... nodes); + + //Element? query(DOMString relativeSelectors); + //[NewObject] + //Elements queryAll(DOMString relativeSelectors); + [Throws] + Element? querySelector(DOMString selectors); + //[NewObject] + [Throws] + NodeList querySelectorAll(DOMString selectors); +}; diff --git a/components/script/dom/webidls/Performance.webidl b/components/script/dom/webidls/Performance.webidl new file mode 100644 index 00000000000..ff7e0ee3754 --- /dev/null +++ b/components/script/dom/webidls/Performance.webidl @@ -0,0 +1,19 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#sec-window.performance-attribute + */ + +typedef double DOMHighResTimeStamp; + +interface Performance { + readonly attribute PerformanceTiming timing; + /* readonly attribute PerformanceNavigation navigation; */ +}; + +partial interface Performance { + DOMHighResTimeStamp now(); +}; diff --git a/components/script/dom/webidls/PerformanceTiming.webidl b/components/script/dom/webidls/PerformanceTiming.webidl new file mode 100644 index 00000000000..c5dfd4502c7 --- /dev/null +++ b/components/script/dom/webidls/PerformanceTiming.webidl @@ -0,0 +1,32 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#sec-navigation-timing-interface + */ + +interface PerformanceTiming { + readonly attribute unsigned long long navigationStart; + /* readonly attribute unsigned long long unloadEventStart; + readonly attribute unsigned long long unloadEventEnd; + readonly attribute unsigned long long redirectStart; + readonly attribute unsigned long long redirectEnd; + readonly attribute unsigned long long fetchStart; + readonly attribute unsigned long long domainLookupStart; + readonly attribute unsigned long long domainLookupEnd; + readonly attribute unsigned long long connectStart; + readonly attribute unsigned long long connectEnd; + readonly attribute unsigned long long secureConnectionStart; + readonly attribute unsigned long long requestStart; + readonly attribute unsigned long long responseStart; + readonly attribute unsigned long long responseEnd; + readonly attribute unsigned long long domLoading; + readonly attribute unsigned long long domInteractive; + readonly attribute unsigned long long domContentLoadedEventStart; + readonly attribute unsigned long long domContentLoadedEventEnd; + readonly attribute unsigned long long domComplete; + readonly attribute unsigned long long loadEventStart; + readonly attribute unsigned long long loadEventEnd; */ +}; diff --git a/components/script/dom/webidls/ProcessingInstruction.webidl b/components/script/dom/webidls/ProcessingInstruction.webidl new file mode 100644 index 00000000000..96426538900 --- /dev/null +++ b/components/script/dom/webidls/ProcessingInstruction.webidl @@ -0,0 +1,12 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/#interface-processinginstruction + */ + +interface ProcessingInstruction : CharacterData { + readonly attribute DOMString target; +}; diff --git a/components/script/dom/webidls/ProgressEvent.webidl b/components/script/dom/webidls/ProgressEvent.webidl new file mode 100644 index 00000000000..420d745fe14 --- /dev/null +++ b/components/script/dom/webidls/ProgressEvent.webidl @@ -0,0 +1,28 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://xhr.spec.whatwg.org/#interface-progressevent + * + * To the extent possible under law, the editor has waived all copyright + * and related or neighboring rights to this work. In addition, as of 1 May 2014, + * the editor has made this specification available under the Open Web Foundation + * Agreement Version 1.0, which is available at + * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0. + */ + +[Constructor(DOMString type, optional ProgressEventInit eventInitDict)/*, + Exposed=Window,Worker*/] +interface ProgressEvent : Event { + readonly attribute boolean lengthComputable; + readonly attribute unsigned long long loaded; + readonly attribute unsigned long long total; +}; + +dictionary ProgressEventInit : EventInit { + boolean lengthComputable = false; + unsigned long long loaded = 0; + unsigned long long total = 0; +}; diff --git a/components/script/dom/webidls/Range.webidl b/components/script/dom/webidls/Range.webidl new file mode 100644 index 00000000000..d74411b1dd9 --- /dev/null +++ b/components/script/dom/webidls/Range.webidl @@ -0,0 +1,85 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/#range + * http://domparsing.spec.whatwg.org/#dom-range-createcontextualfragment + * http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface + */ + +[Constructor] +interface Range { + // [Throws] + // readonly attribute Node startContainer; + // [Throws] + // readonly attribute unsigned long startOffset; + // [Throws] + // readonly attribute Node endContainer; + // [Throws] + // readonly attribute unsigned long endOffset; + // readonly attribute boolean collapsed; + // [Throws] + // readonly attribute Node commonAncestorContainer; + + // [Throws] + // void setStart(Node refNode, unsigned long offset); + // [Throws] + // void setEnd(Node refNode, unsigned long offset); + // [Throws] + // void setStartBefore(Node refNode); + // [Throws] + // void setStartAfter(Node refNode); + // [Throws] + // void setEndBefore(Node refNode); + // [Throws] + // void setEndAfter(Node refNode); + // void collapse(optional boolean toStart = false); + // [Throws] + // void selectNode(Node refNode); + // [Throws] + // void selectNodeContents(Node refNode); + + // const unsigned short START_TO_START = 0; + // const unsigned short START_TO_END = 1; + // const unsigned short END_TO_END = 2; + // const unsigned short END_TO_START = 3; + // [Throws] + // short compareBoundaryPoints(unsigned short how, Range sourceRange); + // [Throws] + // void deleteContents(); + // [Throws] + // DocumentFragment extractContents(); + // [Throws] + // DocumentFragment cloneContents(); + // [Throws] + // void insertNode(Node node); + // [Throws] + // void surroundContents(Node newParent); + + // Range cloneRange(); + void detach(); + + // [Throws] + // boolean isPointInRange(Node node, unsigned long offset); + // [Throws] + // short comparePoint(Node node, unsigned long offset); + + // [Throws] + // boolean intersectsNode(Node node); + + // stringifier; +}; + +// http://domparsing.spec.whatwg.org/#dom-range-createcontextualfragment +partial interface Range { + // [Throws] + // DocumentFragment createContextualFragment(DOMString fragment); +};// + +//// http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface +partial interface Range { + // DOMRectList? getClientRects(); + // DOMRect getBoundingClientRect(); +}; diff --git a/components/script/dom/webidls/Screen.webidl b/components/script/dom/webidls/Screen.webidl new file mode 100644 index 00000000000..3065c113b96 --- /dev/null +++ b/components/script/dom/webidls/Screen.webidl @@ -0,0 +1,14 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://dev.w3.org/csswg/cssom-view/#the-screen-interface +interface Screen { + //readonly attribute double availWidth; + //readonly attribute double availHeight; + //readonly attribute double width; + //readonly attribute double height; + readonly attribute unsigned long colorDepth; + readonly attribute unsigned long pixelDepth; +}; diff --git a/components/script/dom/webidls/TestBinding.webidl b/components/script/dom/webidls/TestBinding.webidl new file mode 100644 index 00000000000..e8ef05d8242 --- /dev/null +++ b/components/script/dom/webidls/TestBinding.webidl @@ -0,0 +1,276 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +enum TestEnum { "", "foo", "bar" }; + +dictionary TestDictionary { + boolean booleanValue; + byte byteValue; + octet octetValue; + short shortValue; + unsigned short unsignedShortValue; + long longValue; + unsigned long unsignedLongValue; + long long longLongValue; + unsigned long long unsignedLongLongValue; + float floatValue; + double doubleValue; + DOMString stringValue; + TestEnum enumValue; + Blob interfaceValue; + any anyValue; +}; + +dictionary TestDictionaryDefaults { + boolean booleanValue = false; + byte byteValue = 7; + octet octetValue = 7; + short shortValue = 7; + unsigned short unsignedShortValue = 7; + long longValue = 7; + unsigned long unsignedLongValue = 7; + long long longLongValue = 7; + unsigned long long unsignedLongLongValue = 7; + // float floatValue = 7.0; + // double doubleValue = 7.0; + DOMString stringValue = ""; + TestEnum enumValue = "bar"; + any anyValue = null; + + boolean? nullableBooleanValue = false; + byte? nullableByteValue = 7; + octet? nullableOctetValue = 7; + short? nullableShortValue = 7; + unsigned short? nullableUnsignedShortValue = 7; + long? nullableLongValue = 7; + unsigned long? nullableUnsignedLongValue = 7; + long long? nullableLongLongValue = 7; + unsigned long long? nullableUnsignedLongLongValue = 7; + // float? nullableFloatValue = 7.0; + // double? nullableDoubleValue = 7.0; + DOMString? nullableStringValue = ""; + // TestEnum? nullableEnumValue = "bar"; +}; + +interface TestBinding { + attribute boolean booleanAttribute; + attribute byte byteAttribute; + attribute octet octetAttribute; + attribute short shortAttribute; + attribute unsigned short unsignedShortAttribute; + attribute long longAttribute; + attribute unsigned long unsignedLongAttribute; + attribute long long longLongAttribute; + attribute unsigned long long unsignedLongLongAttribute; + attribute float floatAttribute; + attribute double doubleAttribute; + attribute DOMString stringAttribute; + attribute ByteString byteStringAttribute; + attribute TestEnum enumAttribute; + attribute Blob interfaceAttribute; + attribute (HTMLElement or long) unionAttribute; + attribute (Event or DOMString) union2Attribute; + attribute any anyAttribute; + + attribute boolean? booleanAttributeNullable; + attribute byte? byteAttributeNullable; + attribute octet? octetAttributeNullable; + attribute short? shortAttributeNullable; + attribute unsigned short? unsignedShortAttributeNullable; + attribute long? longAttributeNullable; + attribute unsigned long? unsignedLongAttributeNullable; + attribute long long? longLongAttributeNullable; + attribute unsigned long long? unsignedLongLongAttributeNullable; + attribute float? floatAttributeNullable; + attribute double? doubleAttributeNullable; + attribute DOMString? stringAttributeNullable; + attribute ByteString? byteStringAttributeNullable; + readonly attribute TestEnum? enumAttributeNullable; + attribute Blob? interfaceAttributeNullable; + attribute (HTMLElement or long)? unionAttributeNullable; + attribute (Event or DOMString)? union2AttributeNullable; + + void receiveVoid(); + boolean receiveBoolean(); + byte receiveByte(); + octet receiveOctet(); + short receiveShort(); + unsigned short receiveUnsignedShort(); + long receiveLong(); + unsigned long receiveUnsignedLong(); + long long receiveLongLong(); + unsigned long long receiveUnsignedLongLong(); + float receiveFloat(); + double receiveDouble(); + DOMString receiveString(); + ByteString receiveByteString(); + TestEnum receiveEnum(); + Blob receiveInterface(); + any receiveAny(); + (HTMLElement or long) receiveUnion(); + (Event or DOMString) receiveUnion2(); + + byte? receiveNullableByte(); + boolean? receiveNullableBoolean(); + octet? receiveNullableOctet(); + short? receiveNullableShort(); + unsigned short? receiveNullableUnsignedShort(); + long? receiveNullableLong(); + unsigned long? receiveNullableUnsignedLong(); + long long? receiveNullableLongLong(); + unsigned long long? receiveNullableUnsignedLongLong(); + float? receiveNullableFloat(); + double? receiveNullableDouble(); + DOMString? receiveNullableString(); + ByteString? receiveNullableByteString(); + TestEnum? receiveNullableEnum(); + Blob? receiveNullableInterface(); + (HTMLElement or long)? receiveNullableUnion(); + (Event or DOMString)? receiveNullableUnion2(); + + void passBoolean(boolean arg); + void passByte(byte arg); + void passOctet(octet arg); + void passShort(short arg); + void passUnsignedShort(unsigned short arg); + void passLong(long arg); + void passUnsignedLong(unsigned long arg); + void passLongLong(long long arg); + void passUnsignedLongLong(unsigned long long arg); + void passFloat(float arg); + void passDouble(double arg); + void passString(DOMString arg); + void passByteString(ByteString arg); + void passEnum(TestEnum arg); + void passInterface(Blob arg); + void passUnion((HTMLElement or long) arg); + void passUnion2((Event or DOMString) data); + void passUnion3((Blob or DOMString) data); + void passAny(any arg); + + void passNullableBoolean(boolean? arg); + void passNullableByte(byte? arg); + void passNullableOctet(octet? arg); + void passNullableShort(short? arg); + void passNullableUnsignedShort(unsigned short? arg); + void passNullableLong(long? arg); + void passNullableUnsignedLong(unsigned long? arg); + void passNullableLongLong(long long? arg); + void passNullableUnsignedLongLong(unsigned long long? arg); + void passNullableFloat(float? arg); + void passNullableDouble(double? arg); + void passNullableString(DOMString? arg); + void passNullableByteString(ByteString? arg); + // void passNullableEnum(TestEnum? arg); + void passNullableInterface(Blob? arg); + void passNullableUnion((HTMLElement or long)? arg); + void passNullableUnion2((Event or DOMString)? data); + + void passOptionalBoolean(optional boolean arg); + void passOptionalByte(optional byte arg); + void passOptionalOctet(optional octet arg); + void passOptionalShort(optional short arg); + void passOptionalUnsignedShort(optional unsigned short arg); + void passOptionalLong(optional long arg); + void passOptionalUnsignedLong(optional unsigned long arg); + void passOptionalLongLong(optional long long arg); + void passOptionalUnsignedLongLong(optional unsigned long long arg); + void passOptionalFloat(optional float arg); + void passOptionalDouble(optional double arg); + void passOptionalString(optional DOMString arg); + void passOptionalByteString(optional ByteString arg); + void passOptionalEnum(optional TestEnum arg); + void passOptionalInterface(optional Blob arg); + void passOptionalUnion(optional (HTMLElement or long) arg); + void passOptionalUnion2(optional (Event or DOMString) data); + void passOptionalAny(optional any arg); + + void passOptionalNullableBoolean(optional boolean? arg); + void passOptionalNullableByte(optional byte? arg); + void passOptionalNullableOctet(optional octet? arg); + void passOptionalNullableShort(optional short? arg); + void passOptionalNullableUnsignedShort(optional unsigned short? arg); + void passOptionalNullableLong(optional long? arg); + void passOptionalNullableUnsignedLong(optional unsigned long? arg); + void passOptionalNullableLongLong(optional long long? arg); + void passOptionalNullableUnsignedLongLong(optional unsigned long long? arg); + void passOptionalNullableFloat(optional float? arg); + void passOptionalNullableDouble(optional double? arg); + void passOptionalNullableString(optional DOMString? arg); + void passOptionalNullableByteString(optional ByteString? arg); + // void passOptionalNullableEnum(optional TestEnum? arg); + void passOptionalNullableInterface(optional Blob? arg); + void passOptionalNullableUnion(optional (HTMLElement or long)? arg); + void passOptionalNullableUnion2(optional (Event or DOMString)? data); + + void passOptionalBooleanWithDefault(optional boolean arg = false); + void passOptionalByteWithDefault(optional byte arg = 0); + void passOptionalOctetWithDefault(optional octet arg = 19); + void passOptionalShortWithDefault(optional short arg = 5); + void passOptionalUnsignedShortWithDefault(optional unsigned short arg = 2); + void passOptionalLongWithDefault(optional long arg = 7); + void passOptionalUnsignedLongWithDefault(optional unsigned long arg = 6); + void passOptionalLongLongWithDefault(optional long long arg = -12); + void passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17); + void passOptionalStringWithDefault(optional DOMString arg = ""); + void passOptionalEnumWithDefault(optional TestEnum arg = "foo"); + // void passOptionalUnionWithDefault(optional (HTMLElement or long) arg = 9); + // void passOptionalUnion2WithDefault(optional(Event or DOMString)? data = "foo"); + + void passOptionalNullableBooleanWithDefault(optional boolean? arg = null); + void passOptionalNullableByteWithDefault(optional byte? arg = null); + void passOptionalNullableOctetWithDefault(optional octet? arg = null); + void passOptionalNullableShortWithDefault(optional short? arg = null); + void passOptionalNullableUnsignedShortWithDefault(optional unsigned short? arg = null); + void passOptionalNullableLongWithDefault(optional long? arg = null); + void passOptionalNullableUnsignedLongWithDefault(optional unsigned long? arg = null); + void passOptionalNullableLongLongWithDefault(optional long long? arg = null); + void passOptionalNullableUnsignedLongLongWithDefault(optional unsigned long long? arg = null); + void passOptionalNullableStringWithDefault(optional DOMString? arg = null); + void passOptionalNullableByteStringWithDefault(optional ByteString? arg = null); + // void passOptionalNullableEnumWithDefault(optional TestEnum? arg = null); + void passOptionalNullableInterfaceWithDefault(optional Blob? arg = null); + void passOptionalNullableUnionWithDefault(optional (HTMLElement or long)? arg = null); + void passOptionalNullableUnion2WithDefault(optional (Event or DOMString)? data = null); + void passOptionalAnyWithDefault(optional any arg = null); + + void passOptionalNullableBooleanWithNonNullDefault(optional boolean? arg = false); + void passOptionalNullableByteWithNonNullDefault(optional byte? arg = 7); + void passOptionalNullableOctetWithNonNullDefault(optional octet? arg = 7); + void passOptionalNullableShortWithNonNullDefault(optional short? arg = 7); + void passOptionalNullableUnsignedShortWithNonNullDefault(optional unsigned short? arg = 7); + void passOptionalNullableLongWithNonNullDefault(optional long? arg = 7); + void passOptionalNullableUnsignedLongWithNonNullDefault(optional unsigned long? arg = 7); + void passOptionalNullableLongLongWithNonNullDefault(optional long long? arg = 7); + void passOptionalNullableUnsignedLongLongWithNonNullDefault(optional unsigned long long? arg = 7); + // void passOptionalNullableFloatWithNonNullDefault(optional float? arg = 0.0); + // void passOptionalNullableDoubleWithNonNullDefault(optional double? arg = 0.0); + void passOptionalNullableStringWithNonNullDefault(optional DOMString? arg = ""); + // void passOptionalNullableEnumWithNonNullDefault(optional TestEnum? arg = "foo"); + // void passOptionalNullableUnionWithNonNullDefault(optional (HTMLElement or long)? arg = 7); + // void passOptionalNullableUnion2WithNonNullDefault(optional (Event or DOMString)? data = "foo"); + + void passVariadicBoolean(boolean... args); + void passVariadicByte(byte... args); + void passVariadicOctet(octet... args); + void passVariadicShort(short... args); + void passVariadicUnsignedShort(unsigned short... args); + void passVariadicLong(long... args); + void passVariadicUnsignedLong(unsigned long... args); + void passVariadicLongLong(long long... args); + void passVariadicUnsignedLongLong(unsigned long long... args); + void passVariadicFloat(float... args); + void passVariadicDouble(double... args); + void passVariadicString(DOMString... args); + void passVariadicByteString(ByteString... args); + void passVariadicEnum(TestEnum... args); + // void passVariadicInterface(Blob... args); + void passVariadicUnion((HTMLElement or long)... args); + void passVariadicUnion2((Event or DOMString)... args); + void passVariadicUnion3((Blob or DOMString)... args); + void passVariadicAny(any... args); + + static attribute boolean booleanAttributeStatic; + static void receiveVoidStatic(); +}; diff --git a/components/script/dom/webidls/Text.webidl b/components/script/dom/webidls/Text.webidl new file mode 100644 index 00000000000..972797c73c8 --- /dev/null +++ b/components/script/dom/webidls/Text.webidl @@ -0,0 +1,18 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/ + * + * To the extent possible under law, the editors have waived all copyright + * and related or neighboring rights to this work. + */ + +// http://dom.spec.whatwg.org/#text +[Constructor(optional DOMString data = "")] +interface Text : CharacterData { + //[NewObject] Text splitText(unsigned long offset); + //readonly attribute DOMString wholeText; +}; diff --git a/components/script/dom/webidls/TreeWalker.webidl b/components/script/dom/webidls/TreeWalker.webidl new file mode 100644 index 00000000000..70987abb528 --- /dev/null +++ b/components/script/dom/webidls/TreeWalker.webidl @@ -0,0 +1,23 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://dom.spec.whatwg.org/#interface-treewalker + */ + +interface TreeWalker { + // [SameObject] readonly attribute Node root; + // readonly attribute unsigned long whatToShow; + // readonly attribute NodeFilter? filter; + // attribute Node currentNode; + + // Node? parentNode(); + // Node? firstChild(); + // Node? lastChild(); + // Node? previousSibling(); + // Node? nextSibling(); + // Node? previousNode(); + // Node? nextNode(); +}; diff --git a/components/script/dom/webidls/UIEvent.webidl b/components/script/dom/webidls/UIEvent.webidl new file mode 100644 index 00000000000..4f5caeaad14 --- /dev/null +++ b/components/script/dom/webidls/UIEvent.webidl @@ -0,0 +1,25 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-UIEvent +[Constructor(DOMString type, optional UIEventInit eventInitDict)] +interface UIEvent : Event { + // readonly attribute WindowProxy? view; + readonly attribute Window? view; + readonly attribute long detail; +}; + +// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-UIEventInit +dictionary UIEventInit : EventInit { + // WindowProxy? view = null; + Window? view = null; + long detail = 0; +}; + +// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-UIEvent-1 +partial interface UIEvent { + // Deprecated in DOM Level 3 + void initUIEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg); +}; diff --git a/components/script/dom/webidls/URLSearchParams.webidl b/components/script/dom/webidls/URLSearchParams.webidl new file mode 100644 index 00000000000..c2e401c45f0 --- /dev/null +++ b/components/script/dom/webidls/URLSearchParams.webidl @@ -0,0 +1,19 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://url.spec.whatwg.org/#interface-urlsearchparams + */ + +[Constructor(optional (DOMString or URLSearchParams) init)] +interface URLSearchParams { + void append(DOMString name, DOMString value); + void delete(DOMString name); + DOMString? get(DOMString name); + // sequence<DOMString> getAll(DOMString name); + boolean has(DOMString name); + void set(DOMString name, DOMString value); + //stringifier; +}; diff --git a/components/script/dom/webidls/URLUtils.webidl b/components/script/dom/webidls/URLUtils.webidl new file mode 100644 index 00000000000..58fe13c5508 --- /dev/null +++ b/components/script/dom/webidls/URLUtils.webidl @@ -0,0 +1,25 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://url.spec.whatwg.org/#urlutils +[NoInterfaceObject] +interface URLUtils { + //stringifier attribute ScalarValueString href; + readonly attribute DOMString href; + //readonly attribute ScalarValueString origin; + + // attribute ScalarValueString protocol; + // attribute ScalarValueString username; + // attribute ScalarValueString password; + // attribute ScalarValueString host; + // attribute ScalarValueString hostname; + // attribute ScalarValueString port; + // attribute ScalarValueString pathname; + // attribute ScalarValueString search; + readonly attribute DOMString search; + // attribute URLSearchParams searchParams; + // attribute ScalarValueString hash; + readonly attribute DOMString hash; +}; diff --git a/components/script/dom/webidls/URLUtilsReadOnly.webidl b/components/script/dom/webidls/URLUtilsReadOnly.webidl new file mode 100644 index 00000000000..8518019a6c1 --- /dev/null +++ b/components/script/dom/webidls/URLUtilsReadOnly.webidl @@ -0,0 +1,23 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://url.spec.whatwg.org/#urlutilsreadonly +[NoInterfaceObject/*, + Exposed=(Window,Worker)*/] +interface URLUtilsReadOnly { + //stringifier readonly attribute ScalarValueString href; + readonly attribute DOMString href; + //readonly attribute ScalarValueString origin; + + //readonly attribute ScalarValueString protocol; + //readonly attribute ScalarValueString host; + //readonly attribute ScalarValueString hostname; + //readonly attribute ScalarValueString port; + //readonly attribute ScalarValueString pathname; + //readonly attribute ScalarValueString search; + readonly attribute DOMString search; + //readonly attribute ScalarValueString hash; + readonly attribute DOMString hash; +}; diff --git a/components/script/dom/webidls/ValidityState.webidl b/components/script/dom/webidls/ValidityState.webidl new file mode 100644 index 00000000000..d99677574cd --- /dev/null +++ b/components/script/dom/webidls/ValidityState.webidl @@ -0,0 +1,19 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#validitystate +interface ValidityState { + //readonly attribute boolean valueMissing; + //readonly attribute boolean typeMismatch; + //readonly attribute boolean patternMismatch; + //readonly attribute boolean tooLong; + //readonly attribute boolean tooShort; + //readonly attribute boolean rangeUnderflow; + //readonly attribute boolean rangeOverflow; + //readonly attribute boolean stepMismatch; + //readonly attribute boolean badInput; + //readonly attribute boolean customError; + //readonly attribute boolean valid; +}; diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl new file mode 100644 index 00000000000..9cd6ed1c045 --- /dev/null +++ b/components/script/dom/webidls/Window.webidl @@ -0,0 +1,131 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#window +[PrimaryGlobal] +/*sealed*/ interface Window : EventTarget { + // the current browsing context + //[Unforgeable] readonly attribute WindowProxy window; + //[Replaceable] readonly attribute WindowProxy self; + readonly attribute Window window; + readonly attribute Window self; + /*[Unforgeable]*/ readonly attribute Document document; + // attribute DOMString name; + /*[PutForwards=href, Unforgeable]*/ readonly attribute Location location; + //readonly attribute History history; + //[Replaceable] readonly attribute BarProp locationbar; + //[Replaceable] readonly attribute BarProp menubar; + //[Replaceable] readonly attribute BarProp personalbar; + //[Replaceable] readonly attribute BarProp scrollbars; + //[Replaceable] readonly attribute BarProp statusbar; + //[Replaceable] readonly attribute BarProp toolbar; + // attribute DOMString status; + void close(); + //readonly attribute boolean closed; + //void stop(); + //void focus(); + //void blur(); + + // other browsing contexts + //[Replaceable] readonly attribute WindowProxy frames; + readonly attribute Window frames; + //[Replaceable] readonly attribute unsigned long length; + //[Unforgeable] readonly attribute WindowProxy top; + // attribute any opener; + //readonly attribute WindowProxy parent; + readonly attribute Window parent; + //readonly attribute Element? frameElement; + //WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", optional DOMString features = "", optional boolean replace = false); + //getter WindowProxy (unsigned long index); + //getter object (DOMString name); + + // the user agent + readonly attribute Navigator navigator; + //[Replaceable] readonly attribute External external; + //readonly attribute ApplicationCache applicationCache; + + // user prompts + //void alert(); + void alert(DOMString message); + //boolean confirm(optional DOMString message = ""); + //DOMString? prompt(optional DOMString message = "", optional DOMString default = ""); + //void print(); + //any showModalDialog(DOMString url, optional any argument); + + //void postMessage(any message, DOMString targetOrigin, optional sequence<Transferable> transfer); + + // also has obsolete members +}; +Window implements GlobalEventHandlers; +Window implements WindowEventHandlers; + +// http://www.whatwg.org/html/#windowtimers +[NoInterfaceObject/*, Exposed=Window,Worker*/] +interface WindowTimers { + //long setTimeout(Function handler, optional long timeout = 0, any... arguments); + //long setTimeout(DOMString handler, optional long timeout = 0, any... arguments); + long setTimeout(any handler, optional long timeout = 0); + void clearTimeout(optional long handle = 0); + //long setInterval(Function handler, optional long timeout = 0, any... arguments); + //long setInterval(DOMString handler, optional long timeout = 0, any... arguments); + long setInterval(any handler, optional long timeout = 0); + void clearInterval(optional long handle = 0); +}; +Window implements WindowTimers; + +// http://www.whatwg.org/html/#atob +[NoInterfaceObject/*, Exposed=Window,Worker*/] +interface WindowBase64 { + [Throws] + DOMString btoa(DOMString btoa); + [Throws] + DOMString atob(DOMString atob); +}; +Window implements WindowBase64; + +// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#sec-window.performance-attribute +partial interface Window { + /*[Replaceable]*/ readonly attribute Performance performance; +}; + +// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-window-interface +partial interface Window { + //MediaQueryList matchMedia(DOMString query); + [SameObject] readonly attribute Screen screen; + + // browsing context + //void moveTo(double x, double y); + //void moveBy(double x, double y); + //void resizeTo(double x, double y); + //void resizeBy(double x, double y); + + // viewport + //readonly attribute double innerWidth; + //readonly attribute double innerHeight; + + // viewport scrolling + //readonly attribute double scrollX; + //readonly attribute double pageXOffset; + //readonly attribute double scrollY; + //readonly attribute double pageYOffset; + //void scroll(double x, double y, optional ScrollOptions options); + //void scrollTo(double x, double y, optional ScrollOptions options); + //void scrollBy(double x, double y, optional ScrollOptions options); + + // client + //readonly attribute double screenX; + //readonly attribute double screenY; + //readonly attribute double outerWidth; + //readonly attribute double outerHeight; + //readonly attribute double devicePixelRatio; +}; + +// Proprietary extensions. +partial interface Window { + readonly attribute Console console; + void debug(DOMString arg); + void gc(); +}; +Window implements OnErrorEventHandlerForWindow; diff --git a/components/script/dom/webidls/Worker.webidl b/components/script/dom/webidls/Worker.webidl new file mode 100644 index 00000000000..2228c203781 --- /dev/null +++ b/components/script/dom/webidls/Worker.webidl @@ -0,0 +1,20 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#abstractworker +[NoInterfaceObject/*, Exposed=Window,Worker*/] +interface AbstractWorker { + // attribute EventHandler onerror; +}; + +// http://www.whatwg.org/html/#worker +[Constructor(DOMString scriptURL)/*, Exposed=Window,Worker*/] +interface Worker : EventTarget { + //void terminate(); + + void postMessage(any message/*, optional sequence<Transferable> transfer*/); + attribute EventHandler onmessage; +}; +Worker implements AbstractWorker; diff --git a/components/script/dom/webidls/WorkerGlobalScope.webidl b/components/script/dom/webidls/WorkerGlobalScope.webidl new file mode 100644 index 00000000000..9c50682b056 --- /dev/null +++ b/components/script/dom/webidls/WorkerGlobalScope.webidl @@ -0,0 +1,32 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#workerglobalscope +//[Exposed=Worker] +interface WorkerGlobalScope : EventTarget { + readonly attribute WorkerGlobalScope self; + readonly attribute WorkerLocation location; + + //void close(); + // attribute OnErrorEventHandler onerror; + // attribute EventHandler onlanguagechange; + // attribute EventHandler onoffline; + // attribute EventHandler ononline; +}; + +// http://www.whatwg.org/html/#WorkerGlobalScope-partial +//[Exposed=Worker] +partial interface WorkerGlobalScope { // not obsolete + [Throws] + void importScripts(DOMString... urls); + readonly attribute WorkerNavigator navigator; +}; +//WorkerGlobalScope implements WindowTimers; +//WorkerGlobalScope implements WindowBase64; + +// Proprietary +partial interface WorkerGlobalScope { + [Replaceable] + readonly attribute Console console; +}; diff --git a/components/script/dom/webidls/WorkerLocation.webidl b/components/script/dom/webidls/WorkerLocation.webidl new file mode 100644 index 00000000000..04d4c8e5cc7 --- /dev/null +++ b/components/script/dom/webidls/WorkerLocation.webidl @@ -0,0 +1,9 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#worker-locations +//[Exposed=Worker] +interface WorkerLocation { }; +WorkerLocation implements URLUtilsReadOnly; diff --git a/components/script/dom/webidls/WorkerNavigator.webidl b/components/script/dom/webidls/WorkerNavigator.webidl new file mode 100644 index 00000000000..aa8e19342e4 --- /dev/null +++ b/components/script/dom/webidls/WorkerNavigator.webidl @@ -0,0 +1,11 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// http://www.whatwg.org/html/#workernavigator +//[Exposed=Worker] +interface WorkerNavigator {}; +WorkerNavigator implements NavigatorID; +//WorkerNavigator implements NavigatorLanguage; +//WorkerNavigator implements NavigatorOnLine; diff --git a/components/script/dom/webidls/XMLHttpRequest.webidl b/components/script/dom/webidls/XMLHttpRequest.webidl new file mode 100644 index 00000000000..ba100ca23ad --- /dev/null +++ b/components/script/dom/webidls/XMLHttpRequest.webidl @@ -0,0 +1,72 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://xhr.spec.whatwg.org/#interface-xmlhttprequest + * + * To the extent possible under law, the editor has waived all copyright + * and related or neighboring rights to this work. In addition, as of 1 May 2014, + * the editor has made this specification available under the Open Web Foundation + * Agreement Version 1.0, which is available at + * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0. + */ + +// http://fetch.spec.whatwg.org/#fetchbodyinit +typedef (/*ArrayBuffer or ArrayBufferView or Blob or FormData or */DOMString or URLSearchParams) FetchBodyInit; + +enum XMLHttpRequestResponseType { + "", + "arraybuffer", + "blob", + "document", + "json", + "text" +}; + +[Constructor/*, + Exposed=Window,Worker*/] +interface XMLHttpRequest : XMLHttpRequestEventTarget { + // event handler + attribute EventHandler onreadystatechange; + + // states + const unsigned short UNSENT = 0; + const unsigned short OPENED = 1; + const unsigned short HEADERS_RECEIVED = 2; + const unsigned short LOADING = 3; + const unsigned short DONE = 4; + + readonly attribute unsigned short readyState; + + // request + [Throws] + void open(ByteString method, /* [EnsureUTF16] */ DOMString url); + [Throws] + void open(ByteString method, /* [EnsureUTF16] */ DOMString url, boolean async, optional /* [EnsureUTF16] */ DOMString? username = null, optional /* [EnsureUTF16] */ DOMString? password = null); + + [Throws] + void setRequestHeader(ByteString name, ByteString value); + [SetterThrows] + attribute unsigned long timeout; + attribute boolean withCredentials; + readonly attribute XMLHttpRequestUpload upload; + [Throws] + void send(optional /*Document or*/ FetchBodyInit? data = null); + void abort(); + + // response + readonly attribute DOMString responseURL; + readonly attribute unsigned short status; + readonly attribute ByteString statusText; + ByteString? getResponseHeader(ByteString name); + ByteString getAllResponseHeaders(); + // void overrideMimeType(DOMString mime); + [SetterThrows] + attribute XMLHttpRequestResponseType responseType; + readonly attribute any response; + [Throws] + readonly attribute DOMString responseText; + /*[Exposed=Window]*/ readonly attribute Document? responseXML; +}; diff --git a/components/script/dom/webidls/XMLHttpRequestEventTarget.webidl b/components/script/dom/webidls/XMLHttpRequestEventTarget.webidl new file mode 100644 index 00000000000..0d772edca0b --- /dev/null +++ b/components/script/dom/webidls/XMLHttpRequestEventTarget.webidl @@ -0,0 +1,26 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://xhr.spec.whatwg.org/#interface-xmlhttprequest + * + * To the extent possible under law, the editor has waived all copyright + * and related or neighboring rights to this work. In addition, as of 1 May 2014, + * the editor has made this specification available under the Open Web Foundation + * Agreement Version 1.0, which is available at + * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0. + */ + +[NoInterfaceObject] +interface XMLHttpRequestEventTarget : EventTarget { + // event handlers + attribute EventHandler onloadstart; + attribute EventHandler onprogress; + attribute EventHandler onabort; + attribute EventHandler onerror; + attribute EventHandler onload; + attribute EventHandler ontimeout; + attribute EventHandler onloadend; +}; diff --git a/components/script/dom/webidls/XMLHttpRequestUpload.webidl b/components/script/dom/webidls/XMLHttpRequestUpload.webidl new file mode 100644 index 00000000000..9ff8b4cc8e6 --- /dev/null +++ b/components/script/dom/webidls/XMLHttpRequestUpload.webidl @@ -0,0 +1,18 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://xhr.spec.whatwg.org/#interface-xmlhttprequest + * + * To the extent possible under law, the editor has waived all copyright + * and related or neighboring rights to this work. In addition, as of 1 May 2014, + * the editor has made this specification available under the Open Web Foundation + * Agreement Version 1.0, which is available at + * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0. + */ + +//[Exposed=Window,Worker] +interface XMLHttpRequestUpload : XMLHttpRequestEventTarget { +}; |