spec/fixtures/html5.idl in webidl-0.0.8 vs spec/fixtures/html5.idl in webidl-0.0.9
- old
+ new
@@ -1,12 +1,8 @@
-interface Example {
- // this is an IDL definition
-};
-
interface HTMLCollection {
readonly attribute unsigned long length;
- caller getter object item(in unsigned long index); // only returns Element
+ caller getter Element item(in unsigned long index);
caller getter object namedItem(in DOMString name); // only returns Element
};
interface HTMLAllCollection : HTMLCollection {
// inherits length and item()
@@ -28,10 +24,11 @@
attribute unsigned long length; // overrides inherited length
caller getter object namedItem(in DOMString name); // overrides inherited namedItem()
void add(in HTMLElement element, in optional HTMLElement before);
void add(in HTMLElement element, in long before);
void remove(in long index);
+ attribute long selectedIndex;
};
interface HTMLPropertiesCollection : HTMLCollection {
// inherits length and item()
caller getter PropertyNodeList namedItem(in DOMString name); // overrides inherited namedItem()
@@ -63,10 +60,23 @@
setter void (in DOMString name, in DOMString value);
creator void (in DOMString name, in DOMString value);
deleter void (in DOMString name);
};
+interface DOMElementMap {
+ getter DOMString (in DOMString name);
+ setter void (in DOMString name, in Element value);
+ creator void (in DOMString name, in Element value);
+ deleter void (in DOMString name);
+};
+
+[Supplemental] exception DOMException {
+ const unsigned short URL_MISMATCH_ERR = 21;
+ const unsigned short QUOTA_EXCEEDED_ERR = 22;
+ const unsigned short DATA_CLONE_ERR = 25;
+};
+
[OverrideBuiltins]
interface HTMLDocument {
// resource metadata management
[PutForwards=href] readonly attribute Location location;
readonly attribute DOMString URL;
@@ -92,11 +102,12 @@
readonly attribute HTMLCollection links;
readonly attribute HTMLCollection forms;
readonly attribute HTMLCollection scripts;
NodeList getElementsByName(in DOMString elementName);
NodeList getElementsByClassName(in DOMString classNames);
- NodeList getItems(in optional DOMString typeNames); // microdata
+ NodeList getItems(in optional DOMString typeNames); // microdata
+ readonly attribute DOMElementMap cssElementMap;
// dynamic markup insertion
attribute DOMString innerHTML;
HTMLDocument open(in optional DOMString type, in optional DOMString replace);
WindowProxy open(in DOMString url, in DOMString name, in DOMString features, in optional boolean replace);
@@ -104,11 +115,10 @@
void write(in DOMString... text);
void writeln(in DOMString... text);
// user interaction
readonly attribute WindowProxy defaultView;
- Selection getSelection();
readonly attribute Element activeElement;
boolean hasFocus();
attribute DOMString designMode;
boolean execCommand(in DOMString commandId);
boolean execCommand(in DOMString commandId, in boolean showUI);
@@ -142,12 +152,10 @@
attribute Function ondurationchange;
attribute Function onemptied;
attribute Function onended;
attribute Function onerror;
attribute Function onfocus;
- attribute Function onformchange;
- attribute Function onforminput;
attribute Function oninput;
attribute Function oninvalid;
attribute Function onkeydown;
attribute Function onkeypress;
attribute Function onkeyup;
@@ -165,10 +173,11 @@
attribute Function onplay;
attribute Function onplaying;
attribute Function onprogress;
attribute Function onratechange;
attribute Function onreadystatechange;
+ attribute Function onreset;
attribute Function onscroll;
attribute Function onseeked;
attribute Function onseeking;
attribute Function onselect;
attribute Function onshow;
@@ -187,11 +196,10 @@
};
DOMImplementation implements DOMHTMLImplementation;
[Supplemental, NoInterfaceObject]
interface XMLDocumentLoader {
- attribute boolean async;
boolean load(in DOMString url);
};
interface HTMLElement : Element {
// DOM tree accessors
@@ -209,11 +217,11 @@
attribute DOMString dir;
attribute DOMString className;
readonly attribute DOMTokenList classList;
readonly attribute DOMStringMap dataset;
- // microdata
+ // microdata
attribute boolean itemScope;
attribute DOMString itemType;
attribute DOMString itemId;
[PutForwards=value] readonly attribute DOMSettableTokenList itemRef;
[PutForwards=value] readonly attribute DOMSettableTokenList itemProp;
@@ -221,22 +229,21 @@
attribute any itemValue;
// user interaction
attribute boolean hidden;
void click();
- void scrollIntoView();
- void scrollIntoView(in boolean top);
attribute long tabIndex;
void focus();
void blur();
attribute DOMString accessKey;
readonly attribute DOMString accessKeyLabel;
attribute boolean draggable;
+ [PutForwards=value] attribute DOMSettableTokenList dropzone;
attribute DOMString contentEditable;
readonly attribute boolean isContentEditable;
attribute HTMLMenuElement contextMenu;
- attribute DOMString spellcheck;
+ attribute boolean spellcheck;
// command API
readonly attribute DOMString commandType;
readonly attribute DOMString label;
readonly attribute DOMString icon;
@@ -268,12 +275,10 @@
attribute Function ondurationchange;
attribute Function onemptied;
attribute Function onended;
attribute Function onerror;
attribute Function onfocus;
- attribute Function onformchange;
- attribute Function onforminput;
attribute Function oninput;
attribute Function oninvalid;
attribute Function onkeydown;
attribute Function onkeypress;
attribute Function onkeyup;
@@ -291,10 +296,11 @@
attribute Function onplay;
attribute Function onplaying;
attribute Function onprogress;
attribute Function onratechange;
attribute Function onreadystatechange;
+ attribute Function onreset;
attribute Function onscroll;
attribute Function onseeked;
attribute Function onseeking;
attribute Function onselect;
attribute Function onshow;
@@ -371,10 +377,11 @@
attribute Function onpopstate;
attribute Function onpagehide;
attribute Function onpageshow;
attribute Function onredo;
attribute Function onresize;
+ attribute Function onscroll;
attribute Function onstorage;
attribute Function onundo;
attribute Function onunload;
};
@@ -391,10 +398,11 @@
};
interface HTMLOListElement : HTMLElement {
attribute boolean reversed;
attribute long start;
+ attribute DOMString type;
};
interface HTMLUListElement : HTMLElement {};
interface HTMLLIElement : HTMLElement {
@@ -500,15 +508,16 @@
attribute DOMString name;
attribute DOMString value;
};
interface HTMLVideoElement : HTMLMediaElement {
- attribute DOMString width;
- attribute DOMString height;
+ attribute unsigned long width;
+ attribute unsigned long height;
readonly attribute unsigned long videoWidth;
readonly attribute unsigned long videoHeight;
attribute DOMString poster;
+ [PutForwards=value] attribute DOMSettableTokenList audio;
};
[NamedConstructor=Audio(),
NamedConstructor=Audio(in DOMString src)]
interface HTMLAudioElement : HTMLMediaElement {};
@@ -519,15 +528,16 @@
attribute DOMString media;
};
interface HTMLTrackElement : HTMLElement {
attribute DOMString kind;
- attribute DOMString label;
attribute DOMString src;
attribute DOMString srclang;
+ attribute DOMString label;
+ attribute boolean default;
- readonly attribute TimedTrack track;
+ readonly attribute TextTrack track;
};
interface HTMLMediaElement : HTMLElement {
// error state
@@ -554,115 +564,174 @@
const unsigned short HAVE_ENOUGH_DATA = 4;
readonly attribute unsigned short readyState;
readonly attribute boolean seeking;
// playback state
- attribute float currentTime;
- readonly attribute float startTime;
- readonly attribute float duration;
+ attribute double currentTime;
+ readonly attribute double initialTime;
+ readonly attribute double duration;
+ readonly attribute Date startOffsetTime;
readonly attribute boolean paused;
- attribute float defaultPlaybackRate;
- attribute float playbackRate;
+ 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 float volume;
+ attribute double volume;
attribute boolean muted;
- // timed tracks
- readonly attribute TimedTrack[] tracks;
- MutableTimedTrack addTrack(in DOMString label, in DOMString kind, in DOMString language);
+ // tracks
+ readonly attribute MultipleTrackList audioTracks;
+ readonly attribute ExclusiveTrackList videoTracks;
+
+ readonly attribute TextTrack[] textTracks;
+ MutableTextTrack addTextTrack(in DOMString kind, in optional DOMString label, in optional DOMString language);
+
};
interface MediaError {
const unsigned short MEDIA_ERR_ABORTED = 1;
const unsigned short MEDIA_ERR_NETWORK = 2;
const unsigned short MEDIA_ERR_DECODE = 3;
const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
readonly attribute unsigned short code;
};
-interface TimedTrack {
+interface TrackList {
+ readonly attribute unsigned long length;
+ DOMString getName(in unsigned long index);
+ DOMString getLanguage(in unsigned long index);
+
+ attribute Function onchange;
+};
+
+interface MultipleTrackList : TrackList {
+ boolean isEnabled(in unsigned long index);
+ void enable(in unsigned long index);
+ void disable(in unsigned long index);
+};
+
+interface ExclusiveTrackList : TrackList {
+ readonly attribute unsigned long selectedIndex;
+ void select(in unsigned long index);
+};
+
+[Constructor]
+interface MediaController {
+ readonly attribute TimeRanges buffered;
+ readonly attribute TimeRanges seekable;
+ readonly attribute double duration;
+ attribute double currentTime;
+
+ readonly attribute boolean paused;
+ void play();
+ void pause();
+
+ attribute double defaultPlaybackRate;
+ attribute double playbackRate;
+
+ attribute double volume;
+ attribute boolean muted;
+
+ attribute Function ondurationchange;
+ attribute Function ontimeupdate;
+ attribute Function onplay;
+ attribute Function onpause;
+ attribute Function onratechange;
+ attribute Function onvolumechange;
+};
+
+interface TextTrack {
readonly attribute DOMString kind;
readonly attribute DOMString label;
readonly attribute DOMString language;
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 Function onload;
- readonly attribute Function onerror;
+ attribute Function onload;
+ attribute Function onerror;
const unsigned short OFF = 0;
const unsigned short HIDDEN = 1;
const unsigned short SHOWING = 2;
attribute unsigned short mode;
- readonly attribute TimedTrackCueList cues;
- readonly attribute TimedTrackCueList activeCues;
+ readonly attribute TextTrackCueList cues;
+ readonly attribute TextTrackCueList activeCues;
- readonly attribute Function oncuechange;
+ attribute Function oncuechange;
};
+TextTrack implements EventTarget;
-interface MutableTimedTrack : TimedTrack {
- void addCue(in TimedTrackCue cue);
- void removeCue(in TimedTrackCue cue);
+interface MutableTextTrack : TextTrack {
+ void addCue(in TextTrackCue cue);
+ void removeCue(in TextTrackCue cue);
};
-interface TimedTrackCueList {
+interface TextTrackCueList {
readonly attribute unsigned long length;
- getter TimedTrackCue (in unsigned long index);
- TimedTrackCue getCueById(in DOMString id);
+ getter TextTrackCue (in unsigned long index);
+ TextTrackCue getCueById(in DOMString id);
};
-[Constructor(in DOMString id, in float startTime, in float endTime, in DOMString text, in optional DOMString settings, in optional DOMString voice, in optional boolean pauseOnExit)]
-interface TimedTrackCue {
- readonly attribute TimedTrack track;
+
+
+[Constructor(in DOMString id, in double startTime, in double endTime, in DOMString text, in optional DOMString settings, in optional boolean pauseOnExit)]
+
+interface TextTrackCue {
+ readonly attribute TextTrack track;
readonly attribute DOMString id;
- readonly attribute float startTime;
- readonly attribute float endTime;
+ readonly attribute double startTime;
+ readonly attribute double endTime;
readonly attribute boolean pauseOnExit;
+
readonly attribute DOMString direction;
readonly attribute boolean snapToLines;
readonly attribute long linePosition;
readonly attribute long textPosition;
readonly attribute long size;
readonly attribute DOMString alignment;
- readonly attribute DOMString voice;
+
DOMString getCueAsSource();
DocumentFragment getCueAsHTML();
- readonly attribute Function onenter;
- readonly attribute Function onexit;
+ attribute Function onenter;
+ attribute Function onexit;
};
+TextTrackCue implements EventTarget;
interface TimeRanges {
readonly attribute unsigned long length;
- float start(in unsigned long index);
- float end(in unsigned long index);
+ double start(in unsigned long index);
+ double end(in unsigned long index);
};
interface HTMLCanvasElement : HTMLElement {
attribute unsigned long width;
attribute unsigned long height;
DOMString toDataURL(in optional DOMString type, in any... args);
- object getContext(in DOMString contextId);
+ object getContext(in DOMString contextId, in any... args);
};
interface CanvasRenderingContext2D {
// back-reference to the canvas
@@ -671,98 +740,98 @@
// state
void save(); // push state on state stack
void restore(); // pop state stack and restore state
// transformations (default transform is the identity matrix)
- void scale(in float x, in float y);
- void rotate(in float angle);
- void translate(in float x, in float y);
- void transform(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
- void setTransform(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
+ void scale(in double x, in double y);
+ void rotate(in double angle);
+ void translate(in double x, in double y);
+ void transform(in double a, in double b, in double c, in double d, in double e, in double f);
+ void setTransform(in double a, in double b, in double c, in double d, in double e, in double f);
// compositing
- attribute float globalAlpha; // (default 1.0)
+ attribute double globalAlpha; // (default 1.0)
attribute DOMString globalCompositeOperation; // (default source-over)
// colors and styles
attribute any strokeStyle; // (default black)
attribute any fillStyle; // (default black)
- CanvasGradient createLinearGradient(in float x0, in float y0, in float x1, in float y1);
- CanvasGradient createRadialGradient(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1);
+ CanvasGradient createLinearGradient(in double x0, in double y0, in double x1, in double y1);
+ CanvasGradient createRadialGradient(in double x0, in double y0, in double r0, in double x1, in double y1, in double r1);
CanvasPattern createPattern(in HTMLImageElement image, in DOMString repetition);
CanvasPattern createPattern(in HTMLCanvasElement image, in DOMString repetition);
CanvasPattern createPattern(in HTMLVideoElement image, in DOMString repetition);
// line caps/joins
- attribute float lineWidth; // (default 1)
+ attribute double lineWidth; // (default 1)
attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
- attribute float miterLimit; // (default 10)
+ attribute double miterLimit; // (default 10)
// shadows
- attribute float shadowOffsetX; // (default 0)
- attribute float shadowOffsetY; // (default 0)
- attribute float shadowBlur; // (default 0)
+ attribute double shadowOffsetX; // (default 0)
+ attribute double shadowOffsetY; // (default 0)
+ attribute double shadowBlur; // (default 0)
attribute DOMString shadowColor; // (default transparent black)
// rects
- void clearRect(in float x, in float y, in float w, in float h);
- void fillRect(in float x, in float y, in float w, in float h);
- void strokeRect(in float x, in float y, in float w, in float h);
+ void clearRect(in double x, in double y, in double w, in double h);
+ void fillRect(in double x, in double y, in double w, in double h);
+ void strokeRect(in double x, in double y, in double w, in double h);
// path API
void beginPath();
void closePath();
- void moveTo(in float x, in float y);
- void lineTo(in float x, in float y);
- void quadraticCurveTo(in float cpx, in float cpy, in float x, in float y);
- void bezierCurveTo(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y);
- void arcTo(in float x1, in float y1, in float x2, in float y2, in float radius);
- void rect(in float x, in float y, in float w, in float h);
- void arc(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean anticlockwise);
+ void moveTo(in double x, in double y);
+ void lineTo(in double x, in double y);
+ void quadraticCurveTo(in double cpx, in double cpy, in double x, in double y);
+ void bezierCurveTo(in double cp1x, in double cp1y, in double cp2x, in double cp2y, in double x, in double y);
+ void arcTo(in double x1, in double y1, in double x2, in double y2, in double radius);
+ void rect(in double x, in double y, in double w, in double h);
+ void arc(in double x, in double y, in double radius, in double startAngle, in double endAngle, in optional boolean anticlockwise);
void fill();
void stroke();
void clip();
- boolean isPointInPath(in float x, in float y);
+ boolean isPointInPath(in double x, in double y);
// focus management
- boolean drawFocusRing(in Element element, in float xCaret, in float yCaret, in optional boolean canDrawCustom);
+ boolean drawFocusRing(in Element element, in double xCaret, in double yCaret, in optional boolean canDrawCustom);
// text
attribute DOMString font; // (default 10px sans-serif)
attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start")
attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
- void fillText(in DOMString text, in float x, in float y, in optional float maxWidth);
- void strokeText(in DOMString text, in float x, in float y, in optional float maxWidth);
+ void fillText(in DOMString text, in double x, in double y, in optional double maxWidth);
+ void strokeText(in DOMString text, in double x, in double y, in optional double maxWidth);
TextMetrics measureText(in DOMString text);
// drawing images
- void drawImage(in HTMLImageElement image, in float dx, in float dy, in optional float dw, in float dh);
- void drawImage(in HTMLImageElement image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
- void drawImage(in HTMLCanvasElement image, in float dx, in float dy, in optional float dw, in float dh);
- void drawImage(in HTMLCanvasElement image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
- void drawImage(in HTMLVideoElement image, in float dx, in float dy, in optional float dw, in float dh);
- void drawImage(in HTMLVideoElement image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
+ void drawImage(in HTMLImageElement image, in double dx, in double dy, in optional double dw, in double dh);
+ void drawImage(in HTMLImageElement image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
+ void drawImage(in HTMLCanvasElement image, in double dx, in double dy, in optional double dw, in double dh);
+ void drawImage(in HTMLCanvasElement image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
+ void drawImage(in HTMLVideoElement image, in double dx, in double dy, in optional double dw, in double dh);
+ void drawImage(in HTMLVideoElement image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
// pixel manipulation
- ImageData createImageData(in float sw, in float sh);
+ ImageData createImageData(in double sw, in double sh);
ImageData createImageData(in ImageData imagedata);
- ImageData getImageData(in float sx, in float sy, in float sw, in float sh);
- void putImageData(in ImageData imagedata, in float dx, in float dy, in optional float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight);
+ ImageData getImageData(in double sx, in double sy, in double sw, in double sh);
+ void putImageData(in ImageData imagedata, in double dx, in double dy, in optional double dirtyX, in double dirtyY, in double dirtyWidth, in double dirtyHeight);
};
interface CanvasGradient {
// opaque object
- void addColorStop(in float offset, in DOMString color);
+ void addColorStop(in double offset, in DOMString color);
};
interface CanvasPattern {
// opaque object
};
interface TextMetrics {
- readonly attribute float width;
+ readonly attribute double width;
};
interface ImageData {
readonly attribute unsigned long width;
readonly attribute unsigned long height;
@@ -861,26 +930,24 @@
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;
- caller getter any item(in unsigned long index);
- caller getter any namedItem(in DOMString name);
+ caller getter any (in unsigned long index);
+ caller getter any (in DOMString name);
void submit();
void reset();
boolean checkValidity();
-
- void dispatchFormInput();
- void dispatchFormChange();
};
interface HTMLFieldSetElement : HTMLElement {
attribute boolean disabled;
readonly attribute HTMLFormElement form;
@@ -912,10 +979,11 @@
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;
@@ -988,18 +1056,19 @@
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;
- caller getter any item(in unsigned long index);
- caller getter any namedItem(in DOMString name);
+ getter any item(in unsigned long index);
+ any namedItem(in DOMString name);
void add(in HTMLElement element, in optional HTMLElement before);
void add(in HTMLElement element, in long before);
void remove(in long index);
readonly attribute HTMLCollection selectedOptions;
@@ -1042,10 +1111,11 @@
};
interface HTMLTextAreaElement : HTMLElement {
attribute boolean autofocus;
attribute unsigned long cols;
+ attribute DOMString dirName;
attribute boolean disabled;
readonly attribute HTMLFormElement form;
attribute long maxLength;
attribute DOMString name;
attribute DOMString placeholder;
@@ -1109,24 +1179,24 @@
readonly attribute NodeList labels;
};
interface HTMLProgressElement : HTMLElement {
- attribute float value;
- attribute float max;
- readonly attribute float position;
+ attribute double value;
+ attribute double max;
+ readonly attribute double position;
readonly attribute HTMLFormElement form;
readonly attribute NodeList labels;
};
interface HTMLMeterElement : HTMLElement {
- attribute float value;
- attribute float min;
- attribute float max;
- attribute float low;
- attribute float high;
- attribute float optimum;
+ attribute double value;
+ attribute double min;
+ attribute double max;
+ attribute double low;
+ attribute double high;
+ attribute double optimum;
readonly attribute HTMLFormElement form;
readonly attribute NodeList labels;
};
interface ValidityState {
@@ -1157,66 +1227,22 @@
interface HTMLMenuElement : HTMLElement {
attribute DOMString type;
attribute DOMString label;
};
-interface HTMLDeviceElement : HTMLElement {
- attribute DOMString type;
- readonly attribute any data;
-};
-
-interface Stream {
- readonly attribute DOMString url;
- StreamRecorder record();
-};
-
-interface StreamRecorder {
- File stop();
-};
-
-[Constructor(in DOMString serverConfiguration)]
-interface ConnectionPeer {
- void sendText(in DOMString text);
- attribute Function ontext; // receiving
-
- void sendBitmap(in HTMLImageElement image);
- attribute Function onbitmap; // receiving
-
- void sendFile(in File file);
- attribute Function onfile; // receiving
-
- void addStream(in Stream stream);
- void removeStream(in Stream stream);
- readonly attribute Stream[] localStreams;
- readonly attribute Stream[] remoteStreams;
- attribute Function onstream; // receiving
-
- void getLocalConfiguration(in ConnectionPeerConfigurationCallback callback); // maybe this should be in the constructor
- void addRemoteConfiguration(in DOMString configuration);
- void close(); // disconnects and stops listening
-
- attribute Function onconnect;
- attribute Function onerror;
- attribute Function ondisconnect;
-};
-
-[Callback=FunctionOnly, NoInterfaceObject]
-interface ConnectionPeerConfigurationCallback {
- void handleEvent(in ConnectionPeer server, in DOMString configuration);
-};
-
-[OverrideBuiltins, ReplaceableNamedProperties]
+[ReplaceableNamedProperties]
interface Window {
// the current browsing context
readonly attribute WindowProxy window;
readonly attribute WindowProxy self;
readonly attribute Document document;
- attribute DOMString name;
+ attribute DOMString name;
[PutForwards=href] readonly attribute Location location;
readonly attribute History history;
+
readonly attribute UndoManager undoManager;
- Selection getSelection();
+
[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;
@@ -1228,19 +1254,19 @@
// other browsing contexts
[Replaceable] readonly attribute WindowProxy frames;
[Replaceable] readonly attribute unsigned long length;
readonly attribute WindowProxy top;
- [Replaceable] readonly attribute WindowProxy opener;
+ attribute WindowProxy opener;
readonly attribute WindowProxy parent;
readonly attribute Element frameElement;
WindowProxy open(in optional DOMString url, in optional DOMString target, in optional DOMString features, in optional DOMString replace);
getter WindowProxy (in unsigned long index);
getter any (in DOMString name);
// the user agent
- readonly attribute Navigator navigator;
+ readonly attribute Navigator navigator;
readonly attribute ApplicationCache applicationCache;
// user prompts
void alert(in DOMString message);
boolean confirm(in DOMString message);
@@ -1276,12 +1302,10 @@
attribute Function ondurationchange;
attribute Function onemptied;
attribute Function onended;
attribute Function onerror;
attribute Function onfocus;
- attribute Function onformchange;
- attribute Function onforminput;
attribute Function onhashchange;
attribute Function oninput;
attribute Function oninvalid;
attribute Function onkeydown;
attribute Function onkeypress;
@@ -1307,10 +1331,11 @@
attribute Function onpopstate;
attribute Function onprogress;
attribute Function onratechange;
attribute Function onreadystatechange;
attribute Function onredo;
+ attribute Function onreset;
attribute Function onresize;
attribute Function onscroll;
attribute Function onseeked;
attribute Function onseeking;
attribute Function onselect;
@@ -1331,10 +1356,11 @@
attribute boolean visible;
};
interface History {
readonly attribute long length;
+ readonly attribute any state;
void go(in optional long delta);
void back();
void forward();
void pushState(in any data, in DOMString title, in optional DOMString url);
void replaceState(in any data, in DOMString title, in optional DOMString url);
@@ -1344,11 +1370,11 @@
stringifier attribute DOMString href;
void assign(in DOMString url);
void replace(in DOMString url);
void reload();
- // URL decomposition IDL attributes
+ // URL decomposition IDL attributes
attribute DOMString protocol;
attribute DOMString host;
attribute DOMString hostname;
attribute DOMString port;
attribute DOMString pathname;
@@ -1363,18 +1389,18 @@
readonly attribute any state;
void initPopStateEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any stateArg);
};
interface HashChangeEvent : Event {
- readonly attribute any oldURL;
- readonly attribute any newURL;
+ readonly attribute DOMString oldURL;
+ readonly attribute DOMString newURL;
void initHashChangeEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString oldURLArg, in DOMString newURLArg);
};
interface PageTransitionEvent : Event {
- readonly attribute any persisted;
- void initPageTransitionEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any persistedArg);
+ readonly attribute boolean persisted;
+ void initPageTransitionEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean persistedArg);
};
interface BeforeUnloadEvent : Event {
attribute DOMString returnValue;
};
@@ -1404,96 +1430,114 @@
attribute Function oncached;
attribute Function onobsolete;
};
ApplicationCache implements EventTarget;
+[Supplemental, NoInterfaceObject]
+interface NavigatorOnLine {
+ readonly attribute boolean onLine;
+};
+
[Callback=FunctionOnly, NoInterfaceObject]
interface Function {
any call(in any... arguments);
};
[Supplemental, NoInterfaceObject]
+interface WindowBase64 {
+ DOMString btoa(in DOMString btoa);
+ DOMString atob(in DOMString atob);
+};
+Window implements WindowBase64;
+
+[Supplemental, NoInterfaceObject]
interface WindowTimers {
long setTimeout(in any handler, in optional any timeout, in any... args);
void clearTimeout(in long handle);
long setInterval(in any handler, in optional any timeout, in any... args);
void clearInterval(in long handle);
};
Window implements WindowTimers;
-[Supplemental, NoInterfaceObject] interface WindowModal {
+[NoInterfaceObject] interface WindowModal {
readonly attribute any dialogArguments;
attribute DOMString returnValue;
};
interface Navigator {
// objects implementing this interface also implement the interfaces given below
};
Navigator implements NavigatorID;
Navigator implements NavigatorOnLine;
-Navigator implements NavigatorAbilities;
+Navigator implements NavigatorContentUtils;
+Navigator implements NavigatorStorageUtils;
[Supplemental, NoInterfaceObject]
interface NavigatorID {
readonly attribute DOMString appName;
readonly attribute DOMString appVersion;
readonly attribute DOMString platform;
readonly attribute DOMString userAgent;
};
[Supplemental, NoInterfaceObject]
-interface NavigatorOnLine {
- readonly attribute boolean onLine;
-};
-
-[Supplemental, NoInterfaceObject]
-interface NavigatorAbilities {
+interface NavigatorContentUtils {
// content handler registration
void registerProtocolHandler(in DOMString scheme, in DOMString url, in DOMString title);
void registerContentHandler(in DOMString mimeType, in DOMString url, in DOMString title);
- void yieldForStorageUpdates();
};
-interface Selection {
- readonly attribute Node anchorNode;
- readonly attribute long anchorOffset;
- readonly attribute Node focusNode;
- readonly attribute long focusOffset;
- readonly attribute boolean isCollapsed;
- void collapse(in Node parentNode, in long offset);
- void collapseToStart();
- void collapseToEnd();
- void selectAllChildren(in Node parentNode);
- void deleteFromDocument();
- readonly attribute long rangeCount;
- Range getRangeAt(in long index);
- void addRange(in Range range);
- void removeRange(in Range range);
- void removeAllRanges();
- stringifier DOMString ();
+[Supplemental, NoInterfaceObject]
+interface NavigatorStorageUtils {
+ void yieldForStorageUpdates();
};
-interface DragEvent : MouseEvent {
- readonly attribute DataTransfer dataTransfer;
-
- void initDragEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dummyArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in EventTarget relatedTargetArg, in DataTransfer dataTransferArg);
-};
-
interface DataTransfer {
attribute DOMString dropEffect;
attribute DOMString effectAllowed;
+ readonly attribute DataTransferItems items;
+
+ void setDragImage(in Element image, in long x, in long y);
+ void addElement(in Element element);
+
+ /* old interface */
readonly attribute DOMStringList types;
- void clearData(in optional DOMString format);
- void setData(in DOMString format, in DOMString data);
DOMString getData(in DOMString format);
+ void setData(in DOMString format, in DOMString data);
+ void clearData(in optional DOMString format);
readonly attribute FileList files;
+};
- void setDragImage(in Element image, in long x, in long y);
- void addElement(in Element element);
+interface DataTransferItems {
+ readonly attribute unsigned long length;
+ getter DataTransferItem (in unsigned long index);
+ deleter void (in unsigned long index);
+ void clear();
+
+ DataTransferItem add(in DOMString data, in DOMString type);
+ DataTransferItem add(in File data);
};
+interface DataTransferItem {
+ readonly attribute DOMString kind;
+ readonly attribute DOMString type;
+ void getAsString(in FunctionStringCallback callback);
+ File getAsFile();
+};
+
+[Callback=FunctionOnly, NoInterfaceObject]
+interface FunctionStringCallback {
+ void handleEvent(in DOMString data);
+};
+
+interface DragEvent : MouseEvent {
+ readonly attribute DataTransfer dataTransfer;
+
+ void initDragEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dummyArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in EventTarget relatedTargetArg, in DataTransfer dataTransferArg);
+};
+
interface UndoManager {
readonly attribute unsigned long length;
getter any item(in unsigned long index);
readonly attribute unsigned long position;
unsigned long add(in any data, in DOMString title);
@@ -1505,10 +1549,104 @@
interface UndoManagerEvent : Event {
readonly attribute any data;
void initUndoManagerEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg);
};
+[Supplemental, NoInterfaceObject]
+interface NavigatorUserMedia {
+ void getUserMedia(in DOMString options, in NavigatorUserMediaSuccessCallback successCallback, in optional NavigatorUserMediaErrorCallback errorCallback);
+};
+Navigator implements NavigatorUserMedia;
+
+[Callback=FunctionOnly, NoInterfaceObject]
+interface NavigatorUserMediaSuccessCallback {
+ void handleEvent(in GeneratedStream stream);
+};
+
+[NoInterfaceObject]
+interface NavigatorUserMediaError {
+ const unsigned short PERMISSION_DENIED = 1;
+ readonly attribute unsigned short code;
+};
+
+[Callback=FunctionOnly, NoInterfaceObject]
+interface NavigatorUserMediaErrorCallback {
+ void handleEvent(in NavigatorUserMediaError error);
+};
+
+interface Stream {
+ readonly attribute DOMString label;
+ StreamRecorder record();
+
+ const unsigned short LIVE = 1;
+ const unsigned short ENDED = 2;
+ readonly attribute unsigned short readyState;
+ attribute Function onended;
+};
+Stream implements EventTarget;
+
+interface GeneratedStream : Stream {
+ void stop();
+
+ // track control
+ readonly attribute MultipleTrackList audioTracks;
+ readonly attribute ExclusiveTrackList videoTracks;
+};
+
+interface StreamRecorder {
+ void getRecordedData(in BlobCallback callback);
+};
+
+[Callback=FunctionOnly, NoInterfaceObject]
+interface BlobCallback {
+ void handleEvent(in Blob blob);
+};
+
+[Supplemental]
+interface URL {
+ static DOMString createObjectURL(in Stream stream);
+};
+
+[Constructor(in DOMString configuration, in SignalingCallback signalingCallback)]
+interface PeerConnection {
+ void signalingMessage(in DOMString message);
+
+ const unsigned short NEW = 0;
+ const unsigned short NEGOTIATING = 1;
+ const unsigned short ACTIVE = 2;
+ const unsigned short CLOSED = 3;
+ readonly attribute unsigned short readyState;
+
+ void send(in DOMString text);
+ void addStream(in Stream stream);
+ void removeStream(in Stream stream);
+ readonly attribute Stream[] localStreams;
+ readonly attribute Stream[] remoteStreams;
+
+ void close();
+
+ // connection quality information
+ attribute Function onconnecting;
+ attribute Function onopen;
+ attribute Function onerror;
+ attribute Function onclose;
+ attribute Function onmessage;
+ attribute Function onaddstream;
+ attribute Function onremovestream;
+};
+PeerConnection implements EventTarget;
+
+[Callback=FunctionOnly, NoInterfaceObject]
+interface SignalingCallback {
+ void handleEvent(in DOMString message, in PeerConnection source);
+};
+
+interface StreamEvent : Event {
+ readonly attribute Stream stream;
+ void initStreamEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in Stream streamArg);
+};
+
interface MessageEvent : Event {
readonly attribute any data;
readonly attribute DOMString origin;
readonly attribute DOMString lastEventId;
readonly attribute WindowProxy source;
@@ -1541,11 +1679,11 @@
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 DOMString _object; // the underscore is not part of the identifier
attribute unsigned long vspace;
attribute DOMString width;
};
interface HTMLMarqueeElement : HTMLElement {
@@ -1555,11 +1693,11 @@
attribute DOMString height;
attribute unsigned long hspace;
attribute long loop;
attribute unsigned long scrollAmount;
attribute unsigned long scrollDelay;
- attribute DOMString trueSpeed;
+ attribute boolean trueSpeed;
attribute unsigned long vspace;
attribute DOMString width;
attribute Function onbounce;
attribute Function onfinish;
@@ -1586,10 +1724,11 @@
attribute Function onpagehide;
attribute Function onpageshow;
attribute Function onpopstate;
attribute Function onredo;
attribute Function onresize;
+ attribute Function onscroll;
attribute Function onstorage;
attribute Function onundo;
attribute Function onunload;
};
@@ -1601,10 +1740,11 @@
attribute DOMString name;
attribute boolean noResize;
attribute DOMString scrolling;
attribute DOMString src;
readonly attribute Document contentDocument;
+ readonly attribute WindowProxy contentWindow;
};
[Supplemental]
interface HTMLAnchorElement {
attribute DOMString coords;
@@ -1620,11 +1760,11 @@
};
interface HTMLBaseFontElement : HTMLElement {
attribute DOMString color;
attribute DOMString face;
- attribute long size;
+ attribute long size;
};
[Supplemental]
interface HTMLBodyElement {
attribute DOMString text;
@@ -1675,11 +1815,11 @@
};
interface HTMLFontElement : HTMLElement {
attribute DOMString color;
attribute DOMString face;
- attribute DOMString size;
+ attribute DOMString size;
};
[Supplemental]
interface HTMLHeadingElement {
attribute DOMString align;
@@ -1767,10 +1907,9 @@
};
[Supplemental]
interface HTMLOListElement {
attribute boolean compact;
- attribute DOMString type;
};
[Supplemental]
interface HTMLParagraphElement {
attribute DOMString align;
\ No newline at end of file