interface HTMLAllCollection : HTMLCollection {
// inherits length and item()
legacycaller getter object? namedItem(DOMString name); // overrides inherited namedItem()
HTMLAllCollection tags(DOMString tagName);
};
interface HTMLFormControlsCollection : HTMLCollection {
// inherits length and item()
legacycaller getter object? namedItem(DOMString name); // overrides inherited namedItem()
};
interface RadioNodeList : NodeList {
attribute DOMString value;
};
interface HTMLOptionsCollection : HTMLCollection {
// inherits item()
attribute unsigned long length; // overrides inherited length
legacycaller getter object? namedItem(DOMString name); // overrides inherited namedItem()
setter creator void (unsigned long index, HTMLOptionElement option);
void add(HTMLOptionElement element, optional HTMLElement? before);
void add(HTMLOptGroupElement element, optional HTMLElement? before);
void add(HTMLOptionElement element, long before);
void add(HTMLOptGroupElement element, long before);
void remove(long index);
attribute long selectedIndex;
};
interface HTMLPropertiesCollection : HTMLCollection {
// inherits length and item()
legacycaller getter PropertyNodeList? namedItem(DOMString name); // overrides inherited namedItem()
readonly attribute DOMStringList names;
};
typedef sequence PropertyValueArray;
interface PropertyNodeList : NodeList {
PropertyValueArray getValues();
};
interface DOMStringMap {
getter DOMString (DOMString name);
setter void (DOMString name, DOMString value);
creator void (DOMString name, DOMString value);
deleter void (DOMString name);
};
interface DOMElementMap {
getter Element (DOMString name);
setter void (DOMString name, Element value);
creator void (DOMString name, Element value);
deleter void (DOMString name);
};
[NoInterfaceObject]
interface Transferable { };
[OverrideBuiltins]
partial interface Document {
// resource metadata management
[PutForwards=href] readonly attribute Location? location;
readonly attribute DOMString URL;
attribute DOMString domain;
readonly attribute DOMString referrer;
attribute DOMString cookie;
readonly attribute DOMString lastModified;
readonly attribute DOMString readyState;
// DOM tree accessors
getter object (DOMString name);
attribute DOMString title;
attribute DOMString dir;
attribute HTMLElement? body;
readonly attribute HTMLHeadElement? head;
readonly attribute HTMLCollection images;
readonly attribute HTMLCollection embeds;
readonly attribute HTMLCollection plugins;
readonly attribute HTMLCollection links;
readonly attribute HTMLCollection forms;
readonly attribute HTMLCollection scripts;
NodeList getElementsByName(DOMString elementName);
NodeList getItems(optional DOMString typeNames); // microdata
readonly attribute DOMElementMap cssElementMap;
// dynamic markup insertion
Document open(optional DOMString type, optional DOMString replace);
WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace);
void close();
void write(DOMString... text);
void writeln(DOMString... text);
// user interaction
readonly attribute WindowProxy? defaultView;
readonly attribute Element? activeElement;
boolean hasFocus();
attribute DOMString designMode;
boolean execCommand(DOMString commandId);
boolean execCommand(DOMString commandId, boolean showUI);
boolean execCommand(DOMString commandId, boolean showUI, DOMString value);
boolean queryCommandEnabled(DOMString commandId);
boolean queryCommandIndeterm(DOMString commandId);
boolean queryCommandState(DOMString commandId);
boolean queryCommandSupported(DOMString commandId);
DOMString queryCommandValue(DOMString commandId);
readonly attribute HTMLCollection commands;
// event handler IDL attributes
[TreatNonCallableAsNull] attribute Function? onabort;
[TreatNonCallableAsNull] attribute Function? onblur;
[TreatNonCallableAsNull] attribute Function? oncanplay;
[TreatNonCallableAsNull] attribute Function? oncanplaythrough;
[TreatNonCallableAsNull] attribute Function? onchange;
[TreatNonCallableAsNull] attribute Function? onclick;
[TreatNonCallableAsNull] attribute Function? oncontextmenu;
[TreatNonCallableAsNull] attribute Function? oncuechange;
[TreatNonCallableAsNull] attribute Function? ondblclick;
[TreatNonCallableAsNull] attribute Function? ondrag;
[TreatNonCallableAsNull] attribute Function? ondragend;
[TreatNonCallableAsNull] attribute Function? ondragenter;
[TreatNonCallableAsNull] attribute Function? ondragleave;
[TreatNonCallableAsNull] attribute Function? ondragover;
[TreatNonCallableAsNull] attribute Function? ondragstart;
[TreatNonCallableAsNull] attribute Function? ondrop;
[TreatNonCallableAsNull] attribute Function? ondurationchange;
[TreatNonCallableAsNull] attribute Function? onemptied;
[TreatNonCallableAsNull] attribute Function? onended;
[TreatNonCallableAsNull] attribute Function? onerror;
[TreatNonCallableAsNull] attribute Function? onfocus;
[TreatNonCallableAsNull] attribute Function? oninput;
[TreatNonCallableAsNull] attribute Function? oninvalid;
[TreatNonCallableAsNull] attribute Function? onkeydown;
[TreatNonCallableAsNull] attribute Function? onkeypress;
[TreatNonCallableAsNull] attribute Function? onkeyup;
[TreatNonCallableAsNull] attribute Function? onload;
[TreatNonCallableAsNull] attribute Function? onloadeddata;
[TreatNonCallableAsNull] attribute Function? onloadedmetadata;
[TreatNonCallableAsNull] attribute Function? onloadstart;
[TreatNonCallableAsNull] attribute Function? onmousedown;
[TreatNonCallableAsNull] attribute Function? onmousemove;
[TreatNonCallableAsNull] attribute Function? onmouseout;
[TreatNonCallableAsNull] attribute Function? onmouseover;
[TreatNonCallableAsNull] attribute Function? onmouseup;
[TreatNonCallableAsNull] attribute Function? onmousewheel;
[TreatNonCallableAsNull] attribute Function? onpause;
[TreatNonCallableAsNull] attribute Function? onplay;
[TreatNonCallableAsNull] attribute Function? onplaying;
[TreatNonCallableAsNull] attribute Function? onprogress;
[TreatNonCallableAsNull] attribute Function? onratechange;
[TreatNonCallableAsNull] attribute Function? onreset;
[TreatNonCallableAsNull] attribute Function? onscroll;
[TreatNonCallableAsNull] attribute Function? onseeked;
[TreatNonCallableAsNull] attribute Function? onseeking;
[TreatNonCallableAsNull] attribute Function? onselect;
[TreatNonCallableAsNull] attribute Function? onshow;
[TreatNonCallableAsNull] attribute Function? onstalled;
[TreatNonCallableAsNull] attribute Function? onsubmit;
[TreatNonCallableAsNull] attribute Function? onsuspend;
[TreatNonCallableAsNull] attribute Function? ontimeupdate;
[TreatNonCallableAsNull] attribute Function? onvolumechange;
[TreatNonCallableAsNull] attribute Function? onwaiting;
// special event handler IDL attributes that only apply to Document objects
[TreatNonCallableAsNull,LenientThis] attribute Function? onreadystatechange;
};
partial interface XMLDocument {
boolean load(DOMString url);
};
interface HTMLElement : Element {
// metadata attributes
attribute DOMString title;
attribute DOMString lang;
attribute DOMString dir;
attribute DOMString className;
readonly attribute DOMTokenList classList;
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;
// 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;
// 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;
// styling
readonly attribute CSSStyleDeclaration style;
// event handler IDL attributes
[TreatNonCallableAsNull] attribute Function? onabort;
[TreatNonCallableAsNull] attribute Function? onblur;
[TreatNonCallableAsNull] attribute Function? oncanplay;
[TreatNonCallableAsNull] attribute Function? oncanplaythrough;
[TreatNonCallableAsNull] attribute Function? onchange;
[TreatNonCallableAsNull] attribute Function? onclick;
[TreatNonCallableAsNull] attribute Function? oncontextmenu;
[TreatNonCallableAsNull] attribute Function? oncuechange;
[TreatNonCallableAsNull] attribute Function? ondblclick;
[TreatNonCallableAsNull] attribute Function? ondrag;
[TreatNonCallableAsNull] attribute Function? ondragend;
[TreatNonCallableAsNull] attribute Function? ondragenter;
[TreatNonCallableAsNull] attribute Function? ondragleave;
[TreatNonCallableAsNull] attribute Function? ondragover;
[TreatNonCallableAsNull] attribute Function? ondragstart;
[TreatNonCallableAsNull] attribute Function? ondrop;
[TreatNonCallableAsNull] attribute Function? ondurationchange;
[TreatNonCallableAsNull] attribute Function? onemptied;
[TreatNonCallableAsNull] attribute Function? onended;
[TreatNonCallableAsNull] attribute Function? onerror;
[TreatNonCallableAsNull] attribute Function? onfocus;
[TreatNonCallableAsNull] attribute Function? oninput;
[TreatNonCallableAsNull] attribute Function? oninvalid;
[TreatNonCallableAsNull] attribute Function? onkeydown;
[TreatNonCallableAsNull] attribute Function? onkeypress;
[TreatNonCallableAsNull] attribute Function? onkeyup;
[TreatNonCallableAsNull] attribute Function? onload;
[TreatNonCallableAsNull] attribute Function? onloadeddata;
[TreatNonCallableAsNull] attribute Function? onloadedmetadata;
[TreatNonCallableAsNull] attribute Function? onloadstart;
[TreatNonCallableAsNull] attribute Function? onmousedown;
[TreatNonCallableAsNull] attribute Function? onmousemove;
[TreatNonCallableAsNull] attribute Function? onmouseout;
[TreatNonCallableAsNull] attribute Function? onmouseover;
[TreatNonCallableAsNull] attribute Function? onmouseup;
[TreatNonCallableAsNull] attribute Function? onmousewheel;
[TreatNonCallableAsNull] attribute Function? onpause;
[TreatNonCallableAsNull] attribute Function? onplay;
[TreatNonCallableAsNull] attribute Function? onplaying;
[TreatNonCallableAsNull] attribute Function? onprogress;
[TreatNonCallableAsNull] attribute Function? onratechange;
[TreatNonCallableAsNull] attribute Function? onreset;
[TreatNonCallableAsNull] attribute Function? onscroll;
[TreatNonCallableAsNull] attribute Function? onseeked;
[TreatNonCallableAsNull] attribute Function? onseeking;
[TreatNonCallableAsNull] attribute Function? onselect;
[TreatNonCallableAsNull] attribute Function? onshow;
[TreatNonCallableAsNull] attribute Function? onstalled;
[TreatNonCallableAsNull] attribute Function? onsubmit;
[TreatNonCallableAsNull] attribute Function? onsuspend;
[TreatNonCallableAsNull] attribute Function? ontimeupdate;
[TreatNonCallableAsNull] attribute Function? onvolumechange;
[TreatNonCallableAsNull] attribute Function? onwaiting;
};
interface HTMLUnknownElement : HTMLElement { };
interface HTMLHtmlElement : HTMLElement {};
interface HTMLHeadElement : HTMLElement {};
interface HTMLTitleElement : HTMLElement {
attribute DOMString text;
};
interface HTMLBaseElement : HTMLElement {
attribute DOMString href;
attribute DOMString target;
};
interface HTMLLinkElement : HTMLElement {
attribute boolean disabled;
attribute DOMString href;
attribute DOMString rel;
readonly attribute DOMTokenList relList;
attribute DOMString media;
attribute DOMString hreflang;
attribute DOMString type;
[PutForwards=value] readonly attribute DOMSettableTokenList sizes;
};
HTMLLinkElement implements LinkStyle;
interface HTMLMetaElement : HTMLElement {
attribute DOMString name;
attribute DOMString httpEquiv;
attribute DOMString content;
};
interface HTMLStyleElement : HTMLElement {
attribute boolean disabled;
attribute DOMString media;
attribute DOMString type;
attribute boolean scoped;
};
HTMLStyleElement implements LinkStyle;
interface HTMLScriptElement : HTMLElement {
attribute DOMString src;
attribute boolean async;
attribute boolean defer;
attribute DOMString type;
attribute DOMString charset;
attribute DOMString text;
};
interface HTMLBodyElement : HTMLElement {
[TreatNonCallableAsNull] attribute Function? onafterprint;
[TreatNonCallableAsNull] attribute Function? onbeforeprint;
[TreatNonCallableAsNull] attribute Function? onbeforeunload;
[TreatNonCallableAsNull] attribute Function? onblur;
[TreatNonCallableAsNull] attribute Function? onerror;
[TreatNonCallableAsNull] attribute Function? onfocus;
[TreatNonCallableAsNull] attribute Function? onhashchange;
[TreatNonCallableAsNull] attribute Function? onload;
[TreatNonCallableAsNull] attribute Function? onmessage;
[TreatNonCallableAsNull] attribute Function? onoffline;
[TreatNonCallableAsNull] attribute Function? ononline;
[TreatNonCallableAsNull] attribute Function? onpopstate;
[TreatNonCallableAsNull] attribute Function? onpagehide;
[TreatNonCallableAsNull] attribute Function? onpageshow;
[TreatNonCallableAsNull] attribute Function? onresize;
[TreatNonCallableAsNull] attribute Function? onscroll;
[TreatNonCallableAsNull] attribute Function? onstorage;
[TreatNonCallableAsNull] attribute Function? onunload;
};
interface HTMLHeadingElement : HTMLElement {};
interface HTMLParagraphElement : HTMLElement {};
interface HTMLHRElement : HTMLElement {};
interface HTMLPreElement : HTMLElement {};
interface HTMLQuoteElement : HTMLElement {
attribute DOMString cite;
};
interface HTMLOListElement : HTMLElement {
attribute boolean reversed;
attribute long start;
attribute DOMString type;
};
interface HTMLUListElement : HTMLElement {};
interface HTMLLIElement : HTMLElement {
attribute long value;
};
interface HTMLDListElement : HTMLElement {};
interface HTMLDivElement : HTMLElement {};
interface HTMLAnchorElement : HTMLElement {
stringifier attribute DOMString href;
attribute DOMString target;
attribute DOMString download;
attribute DOMString ping;
attribute DOMString rel;
readonly attribute DOMTokenList relList;
attribute DOMString media;
attribute DOMString hreflang;
attribute DOMString type;
attribute DOMString text;
// URL decomposition IDL attributes
attribute DOMString protocol;
attribute DOMString host;
attribute DOMString hostname;
attribute DOMString port;
attribute DOMString pathname;
attribute DOMString search;
attribute DOMString hash;
};
interface HTMLDataElement : HTMLElement {
attribute DOMString value;
};
interface HTMLSpanElement : HTMLElement {};
interface HTMLBRElement : HTMLElement {};
interface HTMLModElement : HTMLElement {
attribute DOMString cite;
attribute DOMString dateTime;
};
[NamedConstructor=Image(),
NamedConstructor=Image(unsigned long width),
NamedConstructor=Image(unsigned long width, unsigned long height)]
interface HTMLImageElement : HTMLElement {
attribute DOMString alt;
attribute DOMString src;
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;
};
interface HTMLIFrameElement : HTMLElement {
attribute DOMString src;
attribute DOMString srcdoc;
attribute DOMString name;
[PutForwards=value] readonly attribute DOMSettableTokenList sandbox;
attribute boolean seamless;
attribute DOMString width;
attribute DOMString height;
readonly attribute Document? contentDocument;
readonly attribute WindowProxy? contentWindow;
};
interface HTMLEmbedElement : HTMLElement {
attribute DOMString src;
attribute DOMString type;
attribute DOMString width;
attribute DOMString height;
};
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();
void setCustomValidity(DOMString error);
};
interface HTMLParamElement : HTMLElement {
attribute DOMString name;
attribute DOMString value;
};
interface HTMLVideoElement : HTMLMediaElement {
attribute unsigned long width;
attribute unsigned long height;
readonly attribute unsigned long videoWidth;
readonly attribute unsigned long videoHeight;
attribute DOMString poster;
};
[NamedConstructor=Audio(),
NamedConstructor=Audio(DOMString src)]
interface HTMLAudioElement : HTMLMediaElement {};
interface HTMLSourceElement : HTMLElement {
attribute DOMString src;
attribute DOMString type;
attribute DOMString media;
};
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;
};
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();
DOMString 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;
readonly attribute double initialTime;
readonly attribute double duration;
readonly attribute Date startOffsetTime;
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(DOMString kind, optional DOMString label, 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 AudioTrackList {
readonly attribute unsigned long length;
getter AudioTrack (unsigned long index);
AudioTrack? getTrackById(DOMString id);
[TreatNonCallableAsNull] attribute Function? onchange;
[TreatNonCallableAsNull] attribute Function? onaddtrack;
};
interface AudioTrack {
readonly attribute DOMString id;
readonly attribute DOMString kind;
readonly attribute DOMString label;
readonly attribute DOMString language;
attribute boolean enabled;
};
interface VideoTrackList {
readonly attribute unsigned long length;
getter VideoTrack (unsigned long index);
VideoTrack? getTrackById(DOMString id);
readonly attribute long selectedIndex;
[TreatNonCallableAsNull] attribute Function? onchange;
[TreatNonCallableAsNull] attribute Function? onaddtrack;
};
interface VideoTrack {
readonly attribute DOMString id;
readonly attribute DOMString kind;
readonly attribute DOMString label;
readonly attribute DOMString language;
attribute boolean selected;
};
[Constructor]
interface MediaController {
readonly attribute TimeRanges buffered;
readonly attribute TimeRanges seekable;
readonly attribute double duration;
attribute double currentTime;
readonly attribute boolean paused;
readonly attribute TimeRanges played;
void play();
void pause();
attribute double defaultPlaybackRate;
attribute double playbackRate;
attribute double volume;
attribute boolean muted;
[TreatNonCallableAsNull] attribute Function? onemptied;
[TreatNonCallableAsNull] attribute Function? onloadedmetadata;
[TreatNonCallableAsNull] attribute Function? onloadeddata;
[TreatNonCallableAsNull] attribute Function? oncanplay;
[TreatNonCallableAsNull] attribute Function? oncanplaythrough;
[TreatNonCallableAsNull] attribute Function? onplaying;
[TreatNonCallableAsNull] attribute Function? onended;
[TreatNonCallableAsNull] attribute Function? onwaiting;
[TreatNonCallableAsNull] attribute Function? ondurationchange;
[TreatNonCallableAsNull] attribute Function? ontimeupdate;
[TreatNonCallableAsNull] attribute Function? onplay;
[TreatNonCallableAsNull] attribute Function? onpause;
[TreatNonCallableAsNull] attribute Function? onratechange;
[TreatNonCallableAsNull] attribute Function? onvolumechange;
};
interface TextTrackList {
readonly attribute unsigned long length;
getter TextTrack (unsigned long index);
[TreatNonCallableAsNull] attribute Function? onaddtrack;
};
interface TextTrack : EventTarget {
readonly attribute DOMString kind;
readonly attribute DOMString label;
readonly attribute DOMString language;
const unsigned short DISABLED = 0;
const unsigned short HIDDEN = 1;
const unsigned short SHOWING = 2;
attribute unsigned short mode;
readonly attribute TextTrackCueList? cues;
readonly attribute TextTrackCueList? activeCues;
void addCue(TextTrackCue cue);
void removeCue(TextTrackCue cue);
[TreatNonCallableAsNull] attribute Function? oncuechange;
};
interface TextTrackCueList {
readonly attribute unsigned long length;
getter TextTrackCue (unsigned long index);
TextTrackCue? getCueById(DOMString id);
};
[Constructor(DOMString id, double startTime, double endTime, DOMString text, optional DOMString settings, optional boolean pauseOnExit)]
interface TextTrackCue : EventTarget {
readonly attribute TextTrack? track;
attribute DOMString id;
attribute double startTime;
attribute double endTime;
attribute boolean pauseOnExit;
attribute DOMString direction;
attribute boolean snapToLines;
attribute long linePosition;
attribute long textPosition;
attribute long size;
attribute DOMString alignment;
attribute DOMString cueAsSource;
DocumentFragment getCueAsHTML();
[TreatNonCallableAsNull] attribute Function? onenter;
[TreatNonCallableAsNull] attribute Function? onexit;
};
interface TimeRanges {
readonly attribute unsigned long length;
double start(unsigned long index);
double end(unsigned long index);
};
[Constructor(DOMString type, optional TrackEventInit eventInitDict)]
interface TrackEvent : Event {
readonly attribute object? track;
};
dictionary TrackEventInit : EventInit {
object? Track;
};
interface HTMLCanvasElement : HTMLElement {
attribute unsigned long width;
attribute unsigned long height;
DOMString toDataURL(optional DOMString type, any... args);
void toBlob(FileCallback? callback, optional DOMString type, any... args);
object? getContext(DOMString contextId, any... args);
};
interface CanvasRenderingContext2D {
// back-reference to the canvas
readonly attribute HTMLCanvasElement canvas;
// 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(double x, double y);
void rotate(double angle);
void translate(double x, double y);
void transform(double a, double b, double c, double d, double e, double f);
void setTransform(double a, double b, double c, double d, double e, double f);
// compositing
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(double x0, double y0, double x1, double y1);
CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
CanvasPattern createPattern(HTMLImageElement image, DOMString repetition);
CanvasPattern createPattern(HTMLCanvasElement image, DOMString repetition);
CanvasPattern createPattern(HTMLVideoElement image, DOMString repetition);
// line caps/joins
attribute double lineWidth; // (default 1)
attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
attribute double miterLimit; // (default 10)
// shadows
attribute double shadowOffsetX; // (default 0)
attribute double shadowOffsetY; // (default 0)
attribute double shadowBlur; // (default 0)
attribute DOMString shadowColor; // (default transparent black)
// rects
void clearRect(double x, double y, double w, double h);
void fillRect(double x, double y, double w, double h);
void strokeRect(double x, double y, double w, double h);
// path API
void beginPath();
void closePath();
void moveTo(double x, double y);
void lineTo(double x, double y);
void quadraticCurveTo(double cpx, double cpy, double x, double y);
void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
void arcTo(double x1, double y1, double x2, double y2, double radius);
void rect(double x, double y, double w, double h);
void arc(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise);
void fill();
void stroke();
void drawSystemFocusRing(Element element);
boolean drawCustomFocusRing(Element element);
void scrollPathIntoView();
void clip();
boolean isPointInPath(double x, double y);
// 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(DOMString text, double x, double y, optional double maxWidth);
void strokeText(DOMString text, double x, double y, optional double maxWidth);
TextMetrics measureText(DOMString text);
// drawing images
void drawImage(HTMLImageElement image, double dx, double dy);
void drawImage(HTMLImageElement image, double dx, double dy, double dw, double dh);
void drawImage(HTMLImageElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
void drawImage(HTMLCanvasElement image, double dx, double dy);
void drawImage(HTMLCanvasElement image, double dx, double dy, double dw, double dh);
void drawImage(HTMLCanvasElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
void drawImage(HTMLVideoElement image, double dx, double dy);
void drawImage(HTMLVideoElement image, double dx, double dy, double dw, double dh);
void drawImage(HTMLVideoElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
// 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);
};
interface CanvasGradient {
// opaque object
void addColorStop(double offset, DOMString color);
};
interface CanvasPattern {
// opaque object
};
interface TextMetrics {
readonly attribute double width;
};
interface ImageData {
readonly attribute unsigned long width;
readonly attribute unsigned long height;
readonly attribute Uint8ClampedArray data;
};
interface HTMLMapElement : HTMLElement {
attribute DOMString name;
readonly attribute HTMLCollection areas;
readonly attribute HTMLCollection images;
};
interface HTMLAreaElement : HTMLElement {
attribute DOMString alt;
attribute DOMString coords;
attribute DOMString shape;
stringifier attribute DOMString href;
attribute DOMString target;
attribute DOMString download;
attribute DOMString ping;
attribute DOMString rel;
readonly attribute DOMTokenList relList;
attribute DOMString media;
attribute DOMString hreflang;
attribute DOMString type;
// URL decomposition IDL attributes
attribute DOMString protocol;
attribute DOMString host;
attribute DOMString hostname;
attribute DOMString port;
attribute DOMString pathname;
attribute DOMString search;
attribute DOMString hash;
};
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);
void deleteRow(long index);
attribute DOMString border;
};
interface HTMLTableCaptionElement : HTMLElement {};
interface HTMLTableColElement : HTMLElement {
attribute unsigned long span;
};
interface HTMLTableSectionElement : HTMLElement {
readonly attribute HTMLCollection rows;
HTMLElement insertRow(optional long index);
void deleteRow(long index);
};
interface HTMLTableRowElement : HTMLElement {
readonly attribute long rowIndex;
readonly attribute long sectionRowIndex;
readonly attribute HTMLCollection cells;
HTMLElement insertCell(optional long index);
void deleteCell(long index);
};
interface HTMLTableDataCellElement : HTMLTableCellElement {};
interface HTMLTableHeaderCellElement : HTMLTableCellElement {
attribute DOMString scope;
};
interface HTMLTableCellElement : HTMLElement {
attribute unsigned long colSpan;
attribute unsigned long rowSpan;
[PutForwards=value] readonly attribute DOMSettableTokenList headers;
readonly attribute long cellIndex;
};
[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 object (DOMString name);
void submit();
void reset();
boolean checkValidity();
};
interface HTMLFieldSetElement : HTMLElement {
attribute boolean disabled;
readonly attribute HTMLFormElement? form;
attribute DOMString name;
readonly attribute DOMString type;
readonly attribute HTMLFormControlsCollection elements;
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
void setCustomValidity(DOMString error);
};
interface HTMLLegendElement : HTMLElement {
readonly attribute HTMLFormElement? form;
};
interface HTMLLabelElement : HTMLElement {
readonly attribute HTMLFormElement? form;
attribute DOMString htmlFor;
readonly attribute HTMLElement? control;
};
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;
readonly attribute HTMLElement? list;
attribute DOMString max;
attribute long maxLength;
attribute DOMString min;
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;
attribute DOMString value;
attribute Date valueAsDate;
attribute double valueAsNumber;
attribute unsigned long width;
void stepUp(optional long n);
void stepDown(optional long n);
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
void setCustomValidity(DOMString error);
readonly attribute NodeList labels;
void select();
attribute unsigned long selectionStart;
attribute unsigned long selectionEnd;
attribute DOMString selectionDirection;
void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
};
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;
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
void setCustomValidity(DOMString error);
readonly attribute NodeList labels;
};
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);
object namedItem(DOMString name);
void add(HTMLOptionElement element, optional HTMLElement? before);
void add(HTMLOptGroupElement element, optional HTMLElement? before);
void add(HTMLOptionElement element, long before);
void add(HTMLOptGroupElement element, long before);
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();
void setCustomValidity(DOMString error);
readonly attribute NodeList labels;
};
interface HTMLDataListElement : HTMLElement {
readonly attribute HTMLCollection options;
};
interface HTMLOptGroupElement : HTMLElement {
attribute boolean disabled;
attribute DOMString label;
};
[NamedConstructor=Option(),
NamedConstructor=Option(DOMString text),
NamedConstructor=Option(DOMString text, DOMString value),
NamedConstructor=Option(DOMString text, DOMString value, boolean defaultSelected),
NamedConstructor=Option(DOMString text, DOMString value, boolean defaultSelected, boolean selected)]
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;
};
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;
attribute boolean readOnly;
attribute boolean required;
attribute unsigned long rows;
attribute DOMString wrap;
readonly attribute DOMString type;
attribute DOMString defaultValue;
attribute DOMString value;
readonly attribute unsigned long textLength;
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
void setCustomValidity(DOMString error);
readonly attribute NodeList labels;
void select();
attribute unsigned long selectionStart;
attribute unsigned long selectionEnd;
attribute DOMString selectionDirection;
void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
};
interface HTMLKeygenElement : HTMLElement {
attribute boolean autofocus;
attribute DOMString challenge;
attribute boolean disabled;
readonly attribute HTMLFormElement? form;
attribute DOMString keytype;
attribute DOMString name;
readonly attribute DOMString type;
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
void setCustomValidity(DOMString error);
readonly attribute NodeList labels;
};
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();
void setCustomValidity(DOMString error);
readonly attribute NodeList labels;
};
interface HTMLProgressElement : HTMLElement {
attribute double value;
attribute double max;
readonly attribute double position;
readonly attribute NodeList labels;
};
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;
};
interface ValidityState {
readonly attribute boolean valueMissing;
readonly attribute boolean typeMismatch;
readonly attribute boolean patternMismatch;
readonly attribute boolean tooLong;
readonly attribute boolean rangeUnderflow;
readonly attribute boolean rangeOverflow;
readonly attribute boolean stepMismatch;
readonly attribute boolean customError;
readonly attribute boolean valid;
};
interface HTMLDetailsElement : HTMLElement {
attribute boolean open;
};
interface HTMLCommandElement : HTMLElement {
attribute DOMString type;
attribute DOMString label;
attribute DOMString icon;
attribute boolean disabled;
attribute boolean checked;
attribute DOMString radiogroup;
};
interface HTMLMenuElement : HTMLElement {
attribute DOMString type;
attribute DOMString label;
};
[ReplaceableNamedProperties]
interface Window : EventTarget {
// the current browsing context
[Unforgeable] readonly attribute WindowProxy window;
[Replaceable] readonly attribute WindowProxy self;
[Unforgeable] readonly attribute Document document;
attribute DOMString name;
[PutForwards=href, Unforgeable] readonly attribute Location location;
readonly attribute History history;
boolean find(optional DOMString aString, optional boolean aCaseSensitive, optional boolean aBackwards, optional boolean aWrapAround, optional boolean aWholeWord, optional boolean aSearchInFrames, optional boolean aShowDialog);
[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();
void stop();
void focus();
void blur();
// other browsing contexts
[Replaceable] readonly attribute WindowProxy frames;
[Replaceable] readonly attribute unsigned long length;
[Unforgeable] readonly attribute WindowProxy top;
attribute WindowProxy opener;
readonly attribute WindowProxy parent;
readonly attribute Element? frameElement;
WindowProxy open(optional DOMString url, optional DOMString target, optional DOMString features, optional boolean replace);
getter WindowProxy (unsigned long index);
getter object (DOMString name);
// the user agent
readonly attribute Navigator navigator;
readonly attribute External external;
readonly attribute ApplicationCache applicationCache;
// user prompts
void alert(DOMString message);
boolean confirm(DOMString message);
DOMString? prompt(DOMString message, optional DOMString default);
void print();
any showModalDialog(DOMString url, optional any argument);
// cross-document messaging
void postMessage(any message, DOMString targetOrigin, optional sequence transfer);
// event handler IDL attributes
[TreatNonCallableAsNull] attribute Function? onabort;
[TreatNonCallableAsNull] attribute Function? onafterprint;
[TreatNonCallableAsNull] attribute Function? onbeforeprint;
[TreatNonCallableAsNull] attribute Function? onbeforeunload;
[TreatNonCallableAsNull] attribute Function? onblur;
[TreatNonCallableAsNull] attribute Function? oncanplay;
[TreatNonCallableAsNull] attribute Function? oncanplaythrough;
[TreatNonCallableAsNull] attribute Function? onchange;
[TreatNonCallableAsNull] attribute Function? onclick;
[TreatNonCallableAsNull] attribute Function? oncontextmenu;
[TreatNonCallableAsNull] attribute Function? oncuechange;
[TreatNonCallableAsNull] attribute Function? ondblclick;
[TreatNonCallableAsNull] attribute Function? ondrag;
[TreatNonCallableAsNull] attribute Function? ondragend;
[TreatNonCallableAsNull] attribute Function? ondragenter;
[TreatNonCallableAsNull] attribute Function? ondragleave;
[TreatNonCallableAsNull] attribute Function? ondragover;
[TreatNonCallableAsNull] attribute Function? ondragstart;
[TreatNonCallableAsNull] attribute Function? ondrop;
[TreatNonCallableAsNull] attribute Function? ondurationchange;
[TreatNonCallableAsNull] attribute Function? onemptied;
[TreatNonCallableAsNull] attribute Function? onended;
[TreatNonCallableAsNull] attribute Function? onerror;
[TreatNonCallableAsNull] attribute Function? onfocus;
[TreatNonCallableAsNull] attribute Function? onhashchange;
[TreatNonCallableAsNull] attribute Function? oninput;
[TreatNonCallableAsNull] attribute Function? oninvalid;
[TreatNonCallableAsNull] attribute Function? onkeydown;
[TreatNonCallableAsNull] attribute Function? onkeypress;
[TreatNonCallableAsNull] attribute Function? onkeyup;
[TreatNonCallableAsNull] attribute Function? onload;
[TreatNonCallableAsNull] attribute Function? onloadeddata;
[TreatNonCallableAsNull] attribute Function? onloadedmetadata;
[TreatNonCallableAsNull] attribute Function? onloadstart;
[TreatNonCallableAsNull] attribute Function? onmessage;
[TreatNonCallableAsNull] attribute Function? onmousedown;
[TreatNonCallableAsNull] attribute Function? onmousemove;
[TreatNonCallableAsNull] attribute Function? onmouseout;
[TreatNonCallableAsNull] attribute Function? onmouseover;
[TreatNonCallableAsNull] attribute Function? onmouseup;
[TreatNonCallableAsNull] attribute Function? onmousewheel;
[TreatNonCallableAsNull] attribute Function? onoffline;
[TreatNonCallableAsNull] attribute Function? ononline;
[TreatNonCallableAsNull] attribute Function? onpause;
[TreatNonCallableAsNull] attribute Function? onplay;
[TreatNonCallableAsNull] attribute Function? onplaying;
[TreatNonCallableAsNull] attribute Function? onpagehide;
[TreatNonCallableAsNull] attribute Function? onpageshow;
[TreatNonCallableAsNull] attribute Function? onpopstate;
[TreatNonCallableAsNull] attribute Function? onprogress;
[TreatNonCallableAsNull] attribute Function? onratechange;
[TreatNonCallableAsNull] attribute Function? onreset;
[TreatNonCallableAsNull] attribute Function? onresize;
[TreatNonCallableAsNull] attribute Function? onscroll;
[TreatNonCallableAsNull] attribute Function? onseeked;
[TreatNonCallableAsNull] attribute Function? onseeking;
[TreatNonCallableAsNull] attribute Function? onselect;
[TreatNonCallableAsNull] attribute Function? onshow;
[TreatNonCallableAsNull] attribute Function? onstalled;
[TreatNonCallableAsNull] attribute Function? onstorage;
[TreatNonCallableAsNull] attribute Function? onsubmit;
[TreatNonCallableAsNull] attribute Function? onsuspend;
[TreatNonCallableAsNull] attribute Function? ontimeupdate;
[TreatNonCallableAsNull] attribute Function? onunload;
[TreatNonCallableAsNull] attribute Function? onvolumechange;
[TreatNonCallableAsNull] attribute Function? onwaiting;
};
interface BarProp {
attribute boolean visible;
};
interface History {
readonly attribute long length;
readonly attribute any state;
void go(optional long delta);
void back();
void forward();
void pushState(any data, DOMString title, optional DOMString url);
void replaceState(any data, DOMString title, optional DOMString url);
};
interface Location {
stringifier attribute DOMString href;
void assign(DOMString url);
void replace(DOMString url);
void reload();
// URL decomposition IDL attributes
attribute DOMString protocol;
attribute DOMString host;
attribute DOMString hostname;
attribute DOMString port;
attribute DOMString pathname;
attribute DOMString search;
attribute DOMString hash;
};
[Constructor(DOMString type, optional PopStateEventInit eventInitDict)]
interface PopStateEvent : Event {
readonly attribute any state;
};
dictionary PopStateEventInit : EventInit {
any state;
};
[Constructor(DOMString type, optional HashChangeEventInit eventInitDict)]
interface HashChangeEvent : Event {
readonly attribute DOMString oldURL;
readonly attribute DOMString newURL;
};
dictionary HashChangeEventInit : EventInit {
DOMString oldURL;
DOMString newURL;
};
[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict)]
interface PageTransitionEvent : Event {
readonly attribute boolean persisted;
};
dictionary PageTransitionEventInit : EventInit {
boolean persisted;
};
interface BeforeUnloadEvent : Event {
attribute DOMString returnValue;
};
interface ApplicationCache : EventTarget {
// update status
const unsigned short UNCACHED = 0;
const unsigned short IDLE = 1;
const unsigned short CHECKING = 2;
const unsigned short DOWNLOADING = 3;
const unsigned short UPDATEREADY = 4;
const unsigned short OBSOLETE = 5;
readonly attribute unsigned short status;
// updates
void update();
void abort();
void swapCache();
// events
[TreatNonCallableAsNull] attribute Function? onchecking;
[TreatNonCallableAsNull] attribute Function? onerror;
[TreatNonCallableAsNull] attribute Function? onnoupdate;
[TreatNonCallableAsNull] attribute Function? ondownloading;
[TreatNonCallableAsNull] attribute Function? onprogress;
[TreatNonCallableAsNull] attribute Function? onupdateready;
[TreatNonCallableAsNull] attribute Function? oncached;
[TreatNonCallableAsNull] attribute Function? onobsolete;
};
[NoInterfaceObject]
interface NavigatorOnLine {
readonly attribute boolean onLine;
};
[Callback=FunctionOnly, NoInterfaceObject]
interface Function {
any call(any... arguments);
};
[NoInterfaceObject]
interface WindowBase64 {
DOMString btoa(DOMString btoa);
DOMString atob(DOMString atob);
};
Window implements WindowBase64;
[NoInterfaceObject]
interface WindowTimers {
long setTimeout(Function handler, optional long timeout, any... args);
long setTimeout([AllowAny] DOMString handler, optional long timeout, any... args);
void clearTimeout(long handle);
long setInterval(Function handler, optional long timeout, any... args);
long setInterval([AllowAny] DOMString handler, optional long timeout, any... args);
void clearInterval(long handle);
};
Window implements WindowTimers;
[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 NavigatorContentUtils;
Navigator implements NavigatorStorageUtils;
[NoInterfaceObject]
interface NavigatorID {
readonly attribute DOMString appName;
readonly attribute DOMString appVersion;
readonly attribute DOMString platform;
readonly attribute DOMString userAgent;
};
[NoInterfaceObject]
interface NavigatorContentUtils {
// content handler registration
void registerProtocolHandler(DOMString scheme, DOMString url, DOMString title);
void registerContentHandler(DOMString mimeType, DOMString url, DOMString title);
DOMString isProtocolHandlerRegistered(DOMString scheme, DOMString url);
DOMString isContentHandlerRegistered(DOMString mimeType, DOMString url);
void unregisterProtocolHandler(DOMString scheme, DOMString url);
void unregisterContentHandler(DOMString mimeType, DOMString url);
};
[NoInterfaceObject]
interface NavigatorStorageUtils {
void yieldForStorageUpdates();
};
interface External {
void AddSearchProvider(DOMString engineURL);
unsigned long IsSearchProviderInstalled(DOMString engineURL);
};
interface DataTransfer {
attribute DOMString dropEffect;
attribute DOMString effectAllowed;
readonly attribute DataTransferItemList items;
void setDragImage(Element image, long x, long y);
void addElement(Element element);
/* old interface */
readonly attribute DOMStringList types;
DOMString getData(DOMString format);
void setData(DOMString format, DOMString data);
void clearData(optional DOMString format);
readonly attribute FileList files;
};
interface DataTransferItemList {
readonly attribute unsigned long length;
getter DataTransferItem (unsigned long index);
deleter void (unsigned long index);
void clear();
DataTransferItem? add(DOMString data, DOMString type);
DataTransferItem? add(File data);
};
interface DataTransferItem {
readonly attribute DOMString kind;
readonly attribute DOMString type;
void getAsString(FunctionStringCallback? callback);
File? getAsFile();
};
[Callback=FunctionOnly, NoInterfaceObject]
interface FunctionStringCallback {
void handleEvent(DOMString data);
};
[Constructor(DOMString type, optional DragEventInit eventInitDict)]
interface DragEvent : MouseEvent {
readonly attribute DataTransfer? dataTransfer;
};
dictionary DragEventInit : MouseEventInit {
DataTransfer? dataTransfer;
};
[NoInterfaceObject]
interface NavigatorUserMedia {
void getUserMedia(DOMString options, NavigatorUserMediaSuccessCallback? successCallback, optional NavigatorUserMediaErrorCallback? errorCallback);
};
Navigator implements NavigatorUserMedia;
[Callback=FunctionOnly, NoInterfaceObject]
interface NavigatorUserMediaSuccessCallback {
void handleEvent(LocalMediaStream stream);
};
[NoInterfaceObject]
interface NavigatorUserMediaError {
const unsigned short PERMISSION_DENIED = 1;
readonly attribute unsigned short code;
};
[Callback=FunctionOnly, NoInterfaceObject]
interface NavigatorUserMediaErrorCallback {
void handleEvent(NavigatorUserMediaError error);
};
[Constructor(MediaStream parentStream)]
interface MediaStream : EventTarget {
readonly attribute DOMString label;
readonly attribute MediaStreamTrack[] tracks;
MediaStreamRecorder record();
const unsigned short LIVE = 1;
const unsigned short ENDED = 2;
readonly attribute unsigned short readyState;
[TreatNonCallableAsNull] attribute Function? onended;
};
interface LocalMediaStream : MediaStream {
void stop();
};
interface MediaStreamTrack {
readonly attribute DOMString kind;
readonly attribute DOMString label;
attribute boolean enabled;
};
interface MediaStreamRecorder {
void getRecordedData(BlobCallback? callback);
};
[Callback=FunctionOnly, NoInterfaceObject]
interface BlobCallback {
void handleEvent(Blob blob);
};
partial interface URL {
static DOMString createObjectURL(MediaStream stream);
};
[Constructor(DOMString serverConfiguration, SignalingCallback signalingCallback)]
interface PeerConnection : EventTarget {
void processSignalingMessage(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(DOMString text);
void addStream(MediaStream stream);
void removeStream(MediaStream stream);
readonly attribute MediaStream[] localStreams;
readonly attribute MediaStream[] remoteStreams;
void close();
// connection quality information
[TreatNonCallableAsNull] attribute Function? onconnecting;
[TreatNonCallableAsNull] attribute Function? onopen;
[TreatNonCallableAsNull] attribute Function? onmessage;
[TreatNonCallableAsNull] attribute Function? onaddstream;
[TreatNonCallableAsNull] attribute Function? onremovestream;
};
[Callback=FunctionOnly, NoInterfaceObject]
interface SignalingCallback {
void handleEvent(DOMString message, PeerConnection source);
};
[Constructor(DOMString type, optional MediaStreamEventInit eventInitDict)]
interface MediaStreamEvent : Event {
readonly attribute MediaStream? stream;
};
dictionary MediaStreamEventInit : EventInit {
// DOMString MediaStream? stream;
};
interface WorkerGlobalScope : EventTarget {
readonly attribute WorkerGlobalScope self;
readonly attribute WorkerLocation location;
void close();
[TreatNonCallableAsNull] attribute Function? onerror;
[TreatNonCallableAsNull] attribute Function? onoffline;
[TreatNonCallableAsNull] attribute Function? ononline;
};
WorkerGlobalScope implements WorkerUtils;
[Supplemental, NoInterfaceObject]
interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
void postMessage(any message, optional sequence transfer);
[TreatNonCallableAsNull] attribute Function? onmessage;
};
[Supplemental, NoInterfaceObject]
interface SharedWorkerGlobalScope : WorkerGlobalScope {
readonly attribute DOMString name;
readonly attribute ApplicationCache applicationCache;
[TreatNonCallableAsNull] attribute Function? onconnect;
};
[Constructor(DOMString type, optional ErrorEventInit eventInitDict)]
interface ErrorEvent : Event {
readonly attribute DOMString message;
readonly attribute DOMString filename;
readonly attribute unsigned long lineno;
};
dictionary ErrorEventInit : EventInit {
DOMString message;
DOMString filename;
unsigned long lineno;
};
[Supplemental, NoInterfaceObject]
interface AbstractWorker : EventTarget {
[TreatNonCallableAsNull] attribute Function? onerror;
};
[Constructor(DOMString scriptURL)]
interface Worker : AbstractWorker {
void terminate();
void postMessage(any message, optional sequence transfer);
[TreatNonCallableAsNull] attribute Function? onmessage;
};
[Constructor(DOMString scriptURL, optional DOMString name)]
interface SharedWorker : AbstractWorker {
readonly attribute MessagePort port;
};
[NoInterfaceObject]
interface WorkerUtils {
void importScripts(DOMString... urls);
readonly attribute WorkerNavigator navigator;
};
WorkerUtils implements WindowTimers;
WorkerUtils implements WindowBase64;
interface WorkerNavigator {};
WorkerNavigator implements NavigatorID;
WorkerNavigator implements NavigatorOnLine;
interface WorkerLocation {
// URL decomposition IDL attributes
stringifier readonly attribute DOMString href;
readonly attribute DOMString protocol;
readonly attribute DOMString host;
readonly attribute DOMString hostname;
readonly attribute DOMString port;
readonly attribute DOMString pathname;
readonly attribute DOMString search;
readonly attribute DOMString hash;
};
[Constructor(DOMString type, optional MessageEventInit eventInitDict)]
interface MessageEvent : Event {
readonly attribute any data;
readonly attribute DOMString origin;
readonly attribute DOMString lastEventId;
readonly attribute WindowProxy? source;
readonly attribute MessagePort[]? ports;
};
dictionary MessageEventInit : EventInit {
any data;
DOMString origin;
DOMString lastEventId;
WindowProxy? source;
MessagePort[]? ports;
};
[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict)]
interface EventSource : EventTarget {
readonly attribute DOMString url;
readonly attribute boolean withCredentials;
// ready state
const unsigned short CONNECTING = 0;
const unsigned short OPEN = 1;
const unsigned short CLOSED = 2;
readonly attribute unsigned short readyState;
// networking
[TreatNonCallableAsNull] attribute Function? onopen;
[TreatNonCallableAsNull] attribute Function? onmessage;
[TreatNonCallableAsNull] attribute Function? onerror;
void close();
};
dictionary EventSourceInit {
boolean withCredentials = false;
};
[Constructor(DOMString url, optional DOMString protocols),
Constructor(DOMString url, optional DOMString[] protocols)]
interface WebSocket : EventTarget {
readonly attribute DOMString url;
// ready state
const unsigned short CONNECTING = 0;
const unsigned short OPEN = 1;
const unsigned short CLOSING = 2;
const unsigned short CLOSED = 3;
readonly attribute unsigned short readyState;
readonly attribute unsigned long bufferedAmount;
// networking
[TreatNonCallableAsNull] attribute Function? onopen;
[TreatNonCallableAsNull] attribute Function? onerror;
[TreatNonCallableAsNull] attribute Function? onclose;
readonly attribute DOMString extensions;
readonly attribute DOMString protocol;
void close([Clamp] optional unsigned short code, optional DOMString reason);
// messaging
[TreatNonCallableAsNull] attribute Function? onmessage;
attribute DOMString binaryType;
void send(DOMString data);
void send(ArrayBuffer data);
void send(Blob data);
};
[Constructor(DOMString type, optional CloseEventInit eventInitDict)]
interface CloseEvent : Event {
readonly attribute boolean wasClean;
readonly attribute unsigned short code;
readonly attribute DOMString reason;
};
dictionary CloseEventInit : EventInit {
boolean wasClean;
unsigned short code;
DOMString reason;
};
[Constructor]
interface MessageChannel {
readonly attribute MessagePort port1;
readonly attribute MessagePort port2;
};
interface MessagePort : EventTarget {
void postMessage(any message, optional sequence transfer);
void start();
void close();
// event handlers
[TreatNonCallableAsNull] attribute Function? onmessage;
};
MessagePort implements Transferable;
interface Storage {
readonly attribute unsigned long length;
DOMString? key(unsigned long index);
getter DOMString getItem(DOMString key);
setter creator void setItem(DOMString key, DOMString value);
deleter void removeItem(DOMString key);
void clear();
};
[NoInterfaceObject]
interface WindowSessionStorage {
readonly attribute Storage sessionStorage;
};
Window implements WindowSessionStorage;
[NoInterfaceObject]
interface WindowLocalStorage {
readonly attribute Storage localStorage;
};
Window implements WindowLocalStorage;
[Constructor(DOMString type, optional StorageEventInit eventInitDict)]
interface StorageEvent : Event {
readonly attribute DOMString key;
readonly attribute DOMString? oldValue;
readonly attribute DOMString? newValue;
readonly attribute DOMString url;
readonly attribute Storage? storageArea;
};
dictionary StorageEventInit : EventInit {
DOMString key;
DOMString? oldValue;
DOMString? newValue;
DOMString url;
Storage? storageArea;
};
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;
};
interface HTMLMarqueeElement : HTMLElement {
attribute DOMString behavior;
attribute DOMString bgColor;
attribute DOMString direction;
attribute DOMString height;
attribute unsigned long hspace;
attribute long loop;
attribute unsigned long scrollAmount;
attribute unsigned long scrollDelay;
attribute boolean trueSpeed;
attribute unsigned long vspace;
attribute DOMString width;
[TreatNonCallableAsNull] attribute Function? onbounce;
[TreatNonCallableAsNull] attribute Function? onfinish;
[TreatNonCallableAsNull] attribute Function? onstart;
void start();
void stop();
};
interface HTMLFrameSetElement : HTMLElement {
attribute DOMString cols;
attribute DOMString rows;
[TreatNonCallableAsNull] attribute Function? onafterprint;
[TreatNonCallableAsNull] attribute Function? onbeforeprint;
[TreatNonCallableAsNull] attribute Function? onbeforeunload;
[TreatNonCallableAsNull] attribute Function? onblur;
[TreatNonCallableAsNull] attribute Function? onerror;
[TreatNonCallableAsNull] attribute Function? onfocus;
[TreatNonCallableAsNull] attribute Function? onhashchange;
[TreatNonCallableAsNull] attribute Function? onload;
[TreatNonCallableAsNull] attribute Function? onmessage;
[TreatNonCallableAsNull] attribute Function? onoffline;
[TreatNonCallableAsNull] attribute Function? ononline;
[TreatNonCallableAsNull] attribute Function? onpagehide;
[TreatNonCallableAsNull] attribute Function? onpageshow;
[TreatNonCallableAsNull] attribute Function? onpopstate;
[TreatNonCallableAsNull] attribute Function? onresize;
[TreatNonCallableAsNull] attribute Function? onscroll;
[TreatNonCallableAsNull] attribute Function? onstorage;
[TreatNonCallableAsNull] attribute Function? onunload;
};
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;
};
partial interface HTMLAnchorElement {
attribute DOMString coords;
attribute DOMString charset;
attribute DOMString name;
attribute DOMString rev;
attribute DOMString shape;
};
partial interface HTMLAreaElement {
attribute boolean noHref;
};
interface HTMLBaseFontElement : HTMLElement {
attribute DOMString color;
attribute DOMString face;
attribute long size;
};
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;
};
partial interface HTMLBRElement {
attribute DOMString clear;
};
partial interface HTMLTableCaptionElement {
attribute DOMString align;
};
partial interface HTMLTableColElement {
attribute DOMString align;
attribute DOMString ch;
attribute DOMString chOff;
attribute DOMString vAlign;
attribute DOMString width;
};
interface HTMLDirectoryElement : HTMLElement {
attribute boolean compact;
};
partial interface HTMLDivElement {
attribute DOMString align;
};
partial interface HTMLDListElement {
attribute boolean compact;
};
partial interface HTMLEmbedElement {
attribute DOMString align;
attribute DOMString name;
};
interface HTMLFontElement : HTMLElement {
[TreatNullAs=EmptyString] attribute DOMString color;
attribute DOMString face;
attribute DOMString size;
};
partial interface HTMLHeadingElement {
attribute DOMString align;
};
partial interface HTMLHRElement {
attribute DOMString align;
attribute DOMString color;
attribute boolean noShade;
attribute DOMString size;
attribute DOMString width;
};
partial interface HTMLHtmlElement {
attribute DOMString version;
};
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;
};
partial interface HTMLImageElement {
attribute DOMString name;
attribute DOMString align;
attribute unsigned long hspace;
attribute unsigned long vspace;
attribute DOMString longDesc;
[TreatNullAs=EmptyString] attribute DOMString border;
};
partial interface HTMLInputElement {
attribute DOMString align;
attribute DOMString useMap;
};
partial interface HTMLLegendElement {
attribute DOMString align;
};
partial interface HTMLLIElement {
attribute DOMString type;
};
partial interface HTMLLinkElement {
attribute DOMString charset;
attribute DOMString rev;
attribute DOMString target;
};
partial interface HTMLMenuElement {
attribute boolean compact;
};
partial interface HTMLMetaElement {
attribute DOMString scheme;
};
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;
};
partial interface HTMLOListElement {
attribute boolean compact;
};
partial interface HTMLParagraphElement {
attribute DOMString align;
};
partial interface HTMLParamElement {
attribute DOMString type;
attribute DOMString valueType;
};
partial interface HTMLPreElement {
attribute long width;
};
partial interface HTMLScriptElement {
attribute DOMString event;
attribute DOMString htmlFor;
};
partial interface HTMLTableElement {
attribute DOMString align;
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;
};
partial interface HTMLTableSectionElement {
attribute DOMString align;
attribute DOMString ch;
attribute DOMString chOff;
attribute DOMString vAlign;
};
partial interface HTMLTableCellElement {
attribute DOMString abbr;
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;
};
partial interface HTMLTableRowElement {
attribute DOMString align;
attribute DOMString ch;
attribute DOMString chOff;
attribute DOMString vAlign;
[TreatNullAs=EmptyString] attribute DOMString bgColor;
};
partial interface HTMLUListElement {
attribute boolean compact;
attribute DOMString type;
};
partial interface Document {
[TreatNullAs=EmptyString] attribute DOMString fgColor;
[TreatNullAs=EmptyString] attribute DOMString linkColor;
[TreatNullAs=EmptyString] attribute DOMString vlinkColor;
[TreatNullAs=EmptyString] attribute DOMString alinkColor;
[TreatNullAs=EmptyString] attribute DOMString bgColor;
readonly attribute HTMLCollection anchors;
readonly attribute HTMLCollection applets;
void clear();
readonly attribute HTMLAllCollection all;
};