spec/fixtures/html5.idl in webidl-0.2.0 vs spec/fixtures/html5.idl in webidl-0.2.1

- old
+ new

@@ -26,65 +26,59 @@ void remove(long index); attribute long selectedIndex; }; -[OverrideBuiltins] -interface DOMStringMap { - getter DOMString (DOMString name); - setter void (DOMString name, DOMString value); - deleter void (DOMString name); +interface DOMStringList { + readonly attribute unsigned long length; + getter DOMString? item(unsigned long index); + boolean contains(DOMString string); }; -interface DOMElementMap { - getter Element (DOMString name); - setter creator void (DOMString name, Element value); - deleter void (DOMString name); -}; - - enum DocumentReadyState { "loading", "interactive", "complete" }; +typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement; + [OverrideBuiltins] -partial /*sealed*/ interface Document { +partial interface Document { // resource metadata management [PutForwards=href, Unforgeable] readonly attribute Location? location; - attribute DOMString domain; - readonly attribute DOMString referrer; - attribute DOMString cookie; + attribute USVString domain; + readonly attribute USVString referrer; + attribute USVString cookie; readonly attribute DOMString lastModified; readonly attribute DocumentReadyState readyState; // DOM tree accessors getter object (DOMString name); - attribute DOMString title; + [CEReactions] attribute DOMString title; attribute DOMString dir; attribute HTMLElement? body; readonly attribute HTMLHeadElement? head; [SameObject] readonly attribute HTMLCollection images; [SameObject] readonly attribute HTMLCollection embeds; [SameObject] readonly attribute HTMLCollection plugins; [SameObject] readonly attribute HTMLCollection links; [SameObject] readonly attribute HTMLCollection forms; [SameObject] readonly attribute HTMLCollection scripts; NodeList getElementsByName(DOMString elementName); - readonly attribute HTMLScriptElement? currentScript; + readonly attribute HTMLOrSVGScriptElement? currentScript; // classic scripts in a document tree only // dynamic markup insertion Document open(optional DOMString type = "text/html", optional DOMString replace = ""); WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false); - void close(); - void write(DOMString... text); - void writeln(DOMString... text); + [CEReactions] void close(); + [CEReactions] void write(DOMString... text); + [CEReactions] void writeln(DOMString... text); // user interaction readonly attribute WindowProxy? defaultView; readonly attribute Element? activeElement; boolean hasFocus(); - attribute DOMString designMode; - boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = ""); + [CEReactions] attribute DOMString designMode; + [CEReactions] boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = ""); boolean queryCommandEnabled(DOMString commandId); boolean queryCommandIndeterm(DOMString commandId); boolean queryCommandState(DOMString commandId); boolean queryCommandSupported(DOMString commandId); DOMString queryCommandValue(DOMString commandId); @@ -94,44 +88,47 @@ }; Document implements GlobalEventHandlers; Document implements DocumentAndElementEventHandlers; -partial interface XMLDocument { - boolean load(DOMString url); -}; - - +[HTMLConstructor] interface HTMLElement : Element { // metadata attributes - attribute DOMString title; - attribute DOMString lang; - attribute boolean translate; - attribute DOMString dir; + [CEReactions] attribute DOMString title; + [CEReactions] attribute DOMString lang; + [CEReactions] attribute boolean translate; + [CEReactions] attribute DOMString dir; [SameObject] readonly attribute DOMStringMap dataset; // user interaction - attribute boolean hidden; + [CEReactions] attribute boolean hidden; void click(); - attribute long tabIndex; + [CEReactions] attribute long tabIndex; void focus(); void blur(); - attribute DOMString accessKey; - attribute boolean draggable; - [PutForwards=value] readonly attribute DOMTokenList dropzone; - attribute HTMLMenuElement? contextMenu; - attribute boolean spellcheck; + [CEReactions] attribute DOMString accessKey; + [CEReactions] attribute boolean draggable; + [CEReactions] attribute boolean spellcheck; void forceSpellCheck(); + [CEReactions, TreatNullAs=EmptyString] attribute DOMString innerText; }; HTMLElement implements GlobalEventHandlers; HTMLElement implements DocumentAndElementEventHandlers; HTMLElement implements ElementContentEditable; - +// Note: intentionally not [HTMLConstructor] interface HTMLUnknownElement : HTMLElement { }; +[OverrideBuiltins] +interface DOMStringMap { + getter DOMString (DOMString name); + [CEReactions] setter void (DOMString name, DOMString value); + [CEReactions] deleter void (DOMString name); +}; + + interface HTMLHtmlElement : HTMLElement {}; interface HTMLHeadElement : HTMLElement {}; @@ -146,21 +143,23 @@ attribute DOMString target; }; interface HTMLLinkElement : HTMLElement { - attribute DOMString href; - attribute DOMString? crossOrigin; - attribute DOMString rel; - attribute DOMString rev; - [SameObject, PutForwards=value]readonly attribute DOMTokenList relList; - attribute DOMString media; - attribute DOMString hreflang; - attribute DOMString type; - [SameObject, PutForwards=value] readonly attribute DOMTokenList sizes; + [CEReactions] attribute USVString href; + [CEReactions] attribute DOMString? crossOrigin; + [CEReactions] attribute DOMString rel; + [CEReactions] attribute DOMString rev; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList relList; + [CEReactions] attribute DOMString media; + [CEReactions] attribute DOMString nonce; + [CEReactions] attribute DOMString hreflang; + [CEReactions] attribute DOMString type; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList sizes; + [CEReactions] attribute DOMString referrerPolicy; }; -HTMLLinkElement implements LinkStyle; + HTMLLinkElement implements LinkStyle; interface HTMLMetaElement : HTMLElement { attribute DOMString name; attribute DOMString httpEquiv; @@ -226,10 +225,11 @@ attribute DOMString rev; [SameObject, PutForwards=value] readonly attribute DOMTokenList relList; attribute DOMString hreflang; attribute DOMString type; attribute DOMString text; + attribute DOMString referrerPolicy; }; HTMLAnchorElement implements HTMLHyperlinkElementUtils; interface HTMLDataElement : HTMLElement { @@ -255,11 +255,13 @@ interface HTMLPictureElement : HTMLElement {}; -partial interface HTMLSourceElement { +interface HTMLSourceElement : HTMLElement { + attribute DOMString src; + attribute DOMString type; attribute DOMString srcset; attribute DOMString sizes; attribute DOMString media; }; @@ -270,28 +272,32 @@ attribute DOMString src; attribute DOMString srcset; attribute DOMString sizes; attribute DOMString? crossOrigin; attribute DOMString useMap; + attribute DOMString longDesc; 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; readonly attribute DOMString currentSrc; + attribute DOMString referrerPolicy; }; interface HTMLIFrameElement : HTMLElement { attribute DOMString src; attribute DOMString srcdoc; attribute DOMString name; - [PutForwards=value] readonly attribute DOMTokenList sandbox; + [SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox; attribute boolean allowFullscreen; + attribute boolean allowPaymentRequest; attribute DOMString width; attribute DOMString height; + attribute DOMString referrerPolicy; readonly attribute Document? contentDocument; readonly attribute WindowProxy? contentWindow; }; @@ -343,16 +349,10 @@ [NamedConstructor=Audio(optional DOMString src)] interface HTMLAudioElement : HTMLMediaElement {}; -interface HTMLSourceElement : HTMLElement { - attribute DOMString src; - attribute DOMString type; -}; - - interface HTMLTrackElement : HTMLElement { attribute DOMString kind; attribute DOMString src; attribute DOMString srclang; attribute DOMString label; @@ -555,11 +555,11 @@ interface TrackEvent : Event { readonly attribute (VideoTrack or AudioTrack or TextTrack)? track; }; dictionary TrackEventInit : EventInit { - (VideoTrack or AudioTrack or TextTrack)? track; + (VideoTrack or AudioTrack or TextTrack)? track = null; }; interface HTMLMapElement : HTMLElement { attribute DOMString name; @@ -573,13 +573,14 @@ attribute DOMString coords; attribute DOMString shape; attribute DOMString target; attribute DOMString download; attribute DOMString rel; - readonly attribute DOMTokenList relList; + [SameObject, PutForwards=value] readonly attribute DOMTokenList relList; attribute DOMString hreflang; attribute DOMString type; + attribute DOMString referrerPolicy; }; HTMLAreaElement implements HTMLHyperlinkElementUtils; [NoInterfaceObject] @@ -650,11 +651,11 @@ interface HTMLTableCellElement : HTMLElement { attribute unsigned long colSpan; attribute unsigned long rowSpan; - [PutForwards=value] readonly attribute DOMTokenList headers; + [SameObject, PutForwards=value] readonly attribute DOMTokenList headers; readonly attribute long cellIndex; }; [OverrideBuiltins] @@ -704,22 +705,21 @@ attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; - attribute DOMString inputMode; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute long minLength; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; - attribute boolean required; + attribute boolean _required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; @@ -739,13 +739,13 @@ void setCustomValidity(DOMString error); [SameObject] readonly attribute NodeList labels; void select(); - attribute unsigned long selectionStart; - attribute unsigned long selectionEnd; - attribute DOMString selectionDirection; + attribute unsigned long? selectionStart; + attribute unsigned long? selectionEnd; + attribute DOMString? selectionDirection; void setRangeText(DOMString replacement); void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); }; @@ -760,11 +760,10 @@ attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString name; attribute DOMString type; attribute DOMString value; - attribute HTMLMenuElement? menu; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); @@ -780,11 +779,11 @@ attribute boolean autofocus; attribute boolean disabled; readonly attribute HTMLFormElement? form; attribute boolean multiple; attribute DOMString name; - attribute boolean required; + attribute boolean _required; attribute unsigned long size; readonly attribute DOMString type; [SameObject] readonly attribute HTMLOptionsCollection options; @@ -841,17 +840,16 @@ attribute boolean autofocus; attribute unsigned long cols; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; - attribute DOMString inputMode; attribute long maxLength; attribute long minLength; attribute DOMString name; attribute DOMString placeholder; attribute boolean readOnly; - attribute boolean required; + attribute boolean _required; attribute unsigned long rows; attribute DOMString wrap; readonly attribute DOMString type; attribute DOMString defaultValue; @@ -866,40 +864,19 @@ void setCustomValidity(DOMString error); [SameObject] readonly attribute NodeList labels; void select(); - attribute unsigned long selectionStart; - attribute unsigned long selectionEnd; - attribute DOMString selectionDirection; + attribute unsigned long? selectionStart; + attribute unsigned long? selectionEnd; + attribute DOMString? selectionDirection; void setRangeText(DOMString replacement); void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); }; -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(); - boolean reportValidity(); - void setCustomValidity(DOMString error); - - [SameObject] readonly attribute NodeList labels; -}; - - interface HTMLOutputElement : HTMLElement { [SameObject, PutForwards=value] readonly attribute DOMTokenList htmlFor; readonly attribute HTMLFormElement? form; attribute DOMString name; @@ -986,37 +963,19 @@ interface HTMLDetailsElement : HTMLElement { attribute boolean open; }; -interface HTMLMenuElement : HTMLElement { - attribute DOMString type; - attribute DOMString label; +interface HTMLDialogElement : HTMLElement { + attribute boolean open; + attribute DOMString returnValue; + void show(optional (MouseEvent or Element) anchor); + void showModal(optional (MouseEvent or Element) anchor); + void close(optional DOMString returnValue); }; -interface HTMLMenuItemElement : HTMLElement { - attribute DOMString type; - attribute DOMString label; - attribute DOMString icon; - attribute boolean disabled; - attribute boolean checked; - attribute DOMString radiogroup; - attribute boolean default; -}; - - -[Constructor(DOMString type, optional RelatedEventInit eventInitDict)] -interface RelatedEvent : Event { - readonly attribute EventTarget? relatedTarget; -}; - -dictionary RelatedEventInit : EventInit { - EventTarget? relatedTarget; -}; - - interface HTMLScriptElement : HTMLElement { attribute DOMString src; attribute DOMString type; attribute DOMString charset; attribute boolean async; @@ -1025,10 +984,12 @@ attribute DOMString text; attribute DOMString nonce; }; +[Exposed=Window, + HTMLConstructor] interface HTMLTemplateElement : HTMLElement { readonly attribute DocumentFragment content; }; @@ -1132,21 +1093,23 @@ [Replaceable] readonly attribute WindowProxy parent; readonly attribute Element? frameElement; WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "", optional boolean replace = false); getter WindowProxy (unsigned long index); getter object (DOMString name); +// Since this is the global object, the IDL named getter adds a NamedPropertiesObject exotic +// object on the prototype chain. Indeed, this does not make the global object an exotic object. +// Indexed access is taken care of by the WindowProxy exotic object. // the user agent readonly attribute Navigator navigator; // user prompts void alert(); void alert(DOMString message); boolean confirm(optional DOMString message = ""); DOMString? prompt(optional DOMString message = "", optional DOMString default = ""); void print(); -any showModalDialog(DOMString url, optional any argument); // deprecated unsigned long requestAnimationFrame(FrameRequestCallback callback); void cancelAnimationFrame(unsigned long handle); }; Window implements GlobalEventHandlers; @@ -1173,62 +1136,61 @@ void pushState(any data, DOMString title, optional DOMString? url = null); void replaceState(any data, DOMString title, optional DOMString? url = null); }; -[Unforgeable] interface Location { - stringifier attribute USVString href; - readonly attribute USVString origin; - attribute USVString protocol; - attribute USVString host; - attribute USVString hostname; - attribute USVString port; - attribute USVString pathname; - attribute USVString search; - attribute USVString hash; + [Unforgeable] stringifier attribute USVString href; + [Unforgeable] readonly attribute USVString origin; + [Unforgeable] attribute USVString protocol; + [Unforgeable] attribute USVString host; + [Unforgeable] attribute USVString hostname; + [Unforgeable] attribute USVString port; + [Unforgeable] attribute USVString pathname; + [Unforgeable] attribute USVString search; + [Unforgeable] attribute USVString hash; - void assign(USVString url); - void replace(USVString url); - void reload(); + [Unforgeable] void assign(USVString url); + [Unforgeable] void replace(USVString url); + [Unforgeable] void reload(); - [SameObject] readonly attribute USVString[] ancestorOrigins; + [Unforgeable, SameObject] readonly attribute USVString[] ancestorOrigins; }; [Constructor(DOMString type, optional PopStateEventInit eventInitDict), Exposed=(Window,Worker)] interface PopStateEvent : Event { readonly attribute any state; }; dictionary PopStateEventInit : EventInit { - any state; + any state = null; }; [Constructor(DOMString type, optional HashChangeEventInit eventInitDict), Exposed=(Window,Worker)] interface HashChangeEvent : Event { - readonly attribute DOMString oldURL; - readonly attribute DOMString newURL; + readonly attribute USVString oldURL; + readonly attribute USVString newURL; }; dictionary HashChangeEventInit : EventInit { - DOMString oldURL; - DOMString newURL; + USVString oldURL = ""; + USVString newURL = ""; }; [Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), Exposed=(Window,Worker)] interface PageTransitionEvent : Event { readonly attribute boolean persisted; }; dictionary PageTransitionEventInit : EventInit { - boolean persisted; + boolean persisted = false; }; interface BeforeUnloadEvent : Event { attribute DOMString returnValue; @@ -1296,11 +1258,10 @@ attribute EventHandler oncanplay; attribute EventHandler oncanplaythrough; attribute EventHandler onchange; attribute EventHandler onclick; attribute EventHandler onclose; - attribute EventHandler oncontextmenu; attribute EventHandler oncuechange; attribute EventHandler ondblclick; attribute EventHandler ondrag; attribute EventHandler ondragend; attribute EventHandler ondragenter; @@ -1379,46 +1340,42 @@ attribute EventHandler oncut; attribute EventHandler onpaste; }; +typedef (DOMString or Function) TimerHandler; + [NoInterfaceObject, Exposed=(Window, Worker)] -interface WindowBase64 { +interface WindowOrWorkerGlobalScope { + [Replaceable] readonly attribute USVString origin; + + // Base64 utility methods (WindowBase64) DOMString btoa(DOMString btoa); DOMString atob(DOMString atob); -}; -Window implements WindowBase64; -WorkerGlobalScope implements WindowBase64; - -[NoInterfaceObject, Exposed=(Window,Worker)] -interface WindowTimers { + // Timers (WindowTimers) long setTimeout((Function or DOMString) handler, optional long timeout = 0, any... arguments); void clearTimeout(optional long handle = 0); long setInterval((Function or DOMString) handler, optional long timeout = 0, any... arguments); void clearInterval(optional long handle = 0); -}; -Window implements WindowTimers; -WorkerGlobalScope implements WindowTimers; - -[NoInterfaceObject] -interface WindowModal { - readonly attribute any dialogArguments; - attribute any returnValue; + // ImageBitmap, Images (ImageBitmapFactories) + Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image); + Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh); }; +Window implements WindowOrWorkerGlobalScope; +WorkerGlobalScope implements WindowOrWorkerGlobalScope; interface Navigator { // objects implementing this interface also implement the interfaces given below }; Navigator implements NavigatorID; Navigator implements NavigatorLanguage; Navigator implements NavigatorOnLine; Navigator implements NavigatorContentUtils; Navigator implements NavigatorCookies; -Navigator implements NavigatorPlugins; [NoInterfaceObject, Exposed=(Window, Worker)] interface NavigatorID { [Exposed=Window] readonly attribute DOMString appCodeName; // constant "Mozilla" @@ -1439,62 +1396,25 @@ [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 NavigatorCookies { readonly attribute boolean cookieEnabled; }; -[NoInterfaceObject] - interface NavigatorPlugins { - [SameObject] readonly attribute PluginArray plugins; - [SameObject] readonly attribute MimeTypeArray mimeTypes; - boolean javaEnabled(); -}; - - -interface PluginArray { - void refresh(optional boolean reload = false); - readonly attribute unsigned long length; - getter Plugin? item(unsigned long index); - getter Plugin? namedItem(DOMString name); -}; - - -interface MimeTypeArray { - readonly attribute unsigned long length; - getter MimeType? item(unsigned long index); - getter MimeType? namedItem(DOMString name); -}; - - -interface Plugin { - readonly attribute DOMString name; - readonly attribute DOMString description; - readonly attribute DOMString filename; - readonly attribute unsigned long length; - getter MimeType? item(unsigned long index); - getter MimeType? namedItem(DOMString name); -}; - - -interface MimeType { - readonly attribute DOMString type; - readonly attribute DOMString description; - readonly attribute DOMString suffixes; // comma-separated - readonly attribute Plugin enabledPlugin; -}; - - -[Exposed=(Window, Worker)] +[Exposed=(Window, Worker), Serializable, Transferable] interface ImageBitmap { readonly attribute unsigned long width; readonly attribute unsigned long height; }; @@ -1505,354 +1425,318 @@ ImageData or CanvasRenderingContext2D or ImageBitmap) ImageBitmapSource; -[NoInterfaceObject, Exposed=(Window, Worker)] -interface ImageBitmapFactories { - Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image); - Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh); -}; -Window implements ImageBitmapFactories; -WorkerGlobalScope implements ImageBitmapFactories; - - +// Note: intentionally not [HTMLConstructor] interface HTMLAppletElement : HTMLElement { attribute DOMString align; attribute DOMString alt; attribute DOMString archive; attribute DOMString code; - attribute DOMString codeBase; + attribute USVString codeBase; attribute DOMString height; attribute unsigned long hspace; attribute DOMString name; - attribute DOMString _object; // the underscore is not part of the identifier + attribute USVString _object; // the underscore is not part of the identifier attribute unsigned long vspace; attribute DOMString width; }; +[HTMLConstructor] 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; + [CEReactions] attribute DOMString behavior; + [CEReactions] attribute DOMString bgColor; + [CEReactions] attribute DOMString direction; + [CEReactions] attribute DOMString height; + [CEReactions] attribute unsigned long hspace; + [CEReactions] attribute long loop; + [CEReactions] attribute unsigned long scrollAmount; + [CEReactions] attribute unsigned long scrollDelay; + [CEReactions] attribute boolean trueSpeed; + [CEReactions] attribute unsigned long vspace; + [CEReactions] attribute DOMString width; attribute EventHandler onbounce; attribute EventHandler onfinish; attribute EventHandler onstart; void start(); void stop(); }; +[HTMLConstructor] interface HTMLFrameSetElement : HTMLElement { - attribute DOMString cols; - attribute DOMString rows; + [CEReactions] attribute DOMString cols; + [CEReactions] attribute DOMString rows; }; HTMLFrameSetElement implements WindowEventHandlers; +[HTMLConstructor] interface HTMLFrameElement : HTMLElement { - attribute DOMString name; - attribute DOMString scrolling; - attribute DOMString src; - attribute DOMString frameBorder; - attribute boolean noResize; + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString scrolling; + [CEReactions] attribute USVString src; + [CEReactions] attribute DOMString frameBorder; + [CEReactions] attribute USVString longDesc; + [CEReactions] attribute boolean noResize; readonly attribute Document? contentDocument; readonly attribute WindowProxy? contentWindow; - [TreatNullAs=EmptyString] attribute DOMString marginHeight; - [TreatNullAs=EmptyString] attribute DOMString marginWidth; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginHeight; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginWidth; }; -[Exposed=(Window, SharedWorker)] -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 - attribute EventHandler onchecking; - attribute EventHandler onerror; - attribute EventHandler onnoupdate; - attribute EventHandler ondownloading; - attribute EventHandler onprogress; - attribute EventHandler onupdateready; - attribute EventHandler oncached; - attribute EventHandler onobsolete; -}; - - partial interface HTMLAnchorElement { - attribute DOMString coords; - attribute DOMString charset; - attribute DOMString name; - attribute DOMString shape; + [CEReactions] attribute DOMString coords; + [CEReactions] attribute DOMString charset; + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString shape; }; partial interface HTMLAreaElement { - attribute boolean noHref; + [CEReactions] attribute boolean noHref; }; 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; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString text; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString link; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString vLink; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString aLink; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; attribute DOMString background; }; partial interface HTMLBRElement { - attribute DOMString clear; + [CEReactions] attribute DOMString clear; }; partial interface HTMLTableCaptionElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLTableColElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute DOMString vAlign; + [CEReactions] attribute DOMString width; }; +[HTMLConstructor] interface HTMLDirectoryElement : HTMLElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLDivElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLDListElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLEmbedElement { - attribute DOMString align; - attribute DOMString name; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString name; }; +[HTMLConstructor] interface HTMLFontElement : HTMLElement { - [TreatNullAs=EmptyString] attribute DOMString color; - attribute DOMString face; - attribute DOMString size; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString color; + [CEReactions] attribute DOMString face; + [CEReactions] attribute DOMString size; }; partial interface HTMLHeadingElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLHRElement { - attribute DOMString align; - attribute DOMString color; - attribute boolean noShade; - attribute DOMString size; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString color; + [CEReactions] attribute boolean noShade; + [CEReactions] attribute DOMString size; + [CEReactions] attribute DOMString width; }; partial interface HTMLHtmlElement { - attribute DOMString version; + [CEReactions] attribute DOMString version; }; partial interface HTMLIFrameElement { - attribute DOMString align; - attribute DOMString scrolling; - attribute DOMString frameBorder; - - [TreatNullAs=EmptyString] attribute DOMString marginHeight; - [TreatNullAs=EmptyString] attribute DOMString marginWidth; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString scrolling; + [CEReactions] attribute DOMString frameBorder; + [CEReactions] attribute USVString longDesc; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginHeight; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginWidth; }; partial interface HTMLImageElement { - attribute DOMString name; - attribute DOMString lowsrc; - attribute DOMString align; - attribute unsigned long hspace; - attribute unsigned long vspace; + [CEReactions] attribute DOMString name; + [CEReactions] attribute USVString lowsrc; + [CEReactions] attribute DOMString align; + [CEReactions] attribute unsigned long hspace; + [CEReactions] attribute unsigned long vspace; - [TreatNullAs=EmptyString] attribute DOMString border; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString border; }; partial interface HTMLInputElement { - attribute DOMString align; - attribute DOMString useMap; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString useMap; }; partial interface HTMLLegendElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLLIElement { - attribute DOMString type; + [CEReactions] attribute DOMString type; }; partial interface HTMLLinkElement { - attribute DOMString charset; - attribute DOMString target; + [CEReactions] attribute DOMString charset; + [CEReactions] attribute DOMString target; }; partial interface HTMLMenuElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLMetaElement { - attribute DOMString scheme; + [CEReactions] 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; - attribute DOMString useMap; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString archive; + [CEReactions] attribute DOMString code; + [CEReactions] attribute boolean declare; + [CEReactions] attribute unsigned long hspace; + [CEReactions] attribute DOMString standby; + [CEReactions] attribute unsigned long vspace; + [CEReactions] attribute DOMString codeBase; + [CEReactions] attribute DOMString codeType; - [TreatNullAs=EmptyString] attribute DOMString border; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString border; }; partial interface HTMLOListElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLParagraphElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLParamElement { - attribute DOMString type; - attribute DOMString valueType; + [CEReactions] attribute DOMString type; + [CEReactions] attribute DOMString valueType; }; partial interface HTMLPreElement { - attribute long width; + [CEReactions] attribute long width; }; partial interface HTMLScriptElement { - attribute DOMString event; - attribute DOMString htmlFor; + [CEReactions] attribute DOMString event; + [CEReactions] attribute DOMString htmlFor; }; partial interface HTMLTableElement { - attribute DOMString align; - attribute DOMString border; - attribute DOMString frame; - attribute DOMString rules; - attribute DOMString summary; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString border; + [CEReactions] attribute DOMString frame; + [CEReactions] attribute DOMString rules; + [CEReactions] attribute DOMString summary; + [CEReactions] attribute DOMString width; - [TreatNullAs=EmptyString] attribute DOMString bgColor; - [TreatNullAs=EmptyString] attribute DOMString cellPadding; - [TreatNullAs=EmptyString] attribute DOMString cellSpacing; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString cellPadding; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString cellSpacing; }; partial interface HTMLTableSectionElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute DOMString vAlign; }; partial interface HTMLTableCellElement { - attribute DOMString align; - attribute DOMString axis; - attribute DOMString height; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString axis; + [CEReactions] attribute DOMString height; + [CEReactions] attribute DOMString width; - attribute DOMString ch; - attribute DOMString chOff; - attribute boolean noWrap; - attribute DOMString vAlign; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute boolean noWrap; + [CEReactions] attribute DOMString vAlign; - [TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; }; -partial interface HTMLTableDataCellElement { - attribute DOMString abbr; -}; - - partial interface HTMLTableRowElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute DOMString vAlign; - [TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; }; partial interface HTMLUListElement { - attribute boolean compact; - attribute DOMString type; + [CEReactions] attribute boolean compact; + [CEReactions] 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; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString fgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString linkColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString vlinkColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString alinkColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; [SameObject] readonly attribute HTMLCollection anchors; [SameObject] readonly attribute HTMLCollection applets; void clear(); @@ -1876,10 +1760,53 @@ void AddSearchProvider(); void IsSearchProviderInstalled(); }; +Navigator implements NavigatorPlugins; + +[NoInterfaceObject] + interface NavigatorPlugins { + [SameObject] readonly attribute PluginArray plugins; + [SameObject] readonly attribute MimeTypeArray mimeTypes; + boolean javaEnabled(); +}; + + +interface PluginArray { + void refresh(optional boolean reload = false); + readonly attribute unsigned long length; + getter Plugin? item(unsigned long index); + getter Plugin? namedItem(DOMString name); +}; + + +interface MimeTypeArray { + readonly attribute unsigned long length; + getter MimeType? item(unsigned long index); + getter MimeType? namedItem(DOMString name); +}; + + +interface Plugin { + readonly attribute DOMString name; + readonly attribute DOMString description; + readonly attribute DOMString filename; + readonly attribute unsigned long length; + getter MimeType? item(unsigned long index); + getter MimeType? namedItem(DOMString name); +}; + + +interface MimeType { + readonly attribute DOMString type; + readonly attribute DOMString description; + readonly attribute DOMString suffixes; // comma-separated + readonly attribute Plugin enabledPlugin; +}; + + [LegacyUnenumerableNamedProperties] interface HTMLAllCollection { readonly attribute unsigned long length; getter Element? (unsigned long index); getter (HTMLCollection or Element)? namedItem(DOMString name); @@ -1902,63 +1829,58 @@ void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); void remove(long index); attribute long selectedIndex; }; -[OverrideBuiltins] -interface DOMStringMap { - getter DOMString (DOMString name); - setter void (DOMString name, DOMString value); - deleter void (DOMString name); +interface DOMStringList { + readonly attribute unsigned long length; + getter DOMString? item(unsigned long index); + boolean contains(DOMString string); }; -interface DOMElementMap { - getter Element (DOMString name); - setter creator void (DOMString name, Element value); - deleter void (DOMString name); -}; - enum DocumentReadyState { "loading", "interactive", "complete" }; +typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement; + [OverrideBuiltins] -partial /*sealed*/ interface Document { +partial interface Document { // resource metadata management [PutForwards=href, Unforgeable] readonly attribute Location? location; - attribute DOMString domain; - readonly attribute DOMString referrer; - attribute DOMString cookie; + attribute USVString domain; + readonly attribute USVString referrer; + attribute USVString cookie; readonly attribute DOMString lastModified; readonly attribute DocumentReadyState readyState; // DOM tree accessors getter object (DOMString name); - attribute DOMString title; + [CEReactions] attribute DOMString title; attribute DOMString dir; attribute HTMLElement? body; readonly attribute HTMLHeadElement? head; [SameObject] readonly attribute HTMLCollection images; [SameObject] readonly attribute HTMLCollection embeds; [SameObject] readonly attribute HTMLCollection plugins; [SameObject] readonly attribute HTMLCollection links; [SameObject] readonly attribute HTMLCollection forms; [SameObject] readonly attribute HTMLCollection scripts; NodeList getElementsByName(DOMString elementName); - readonly attribute HTMLScriptElement? currentScript; + readonly attribute HTMLOrSVGScriptElement? currentScript; // classic scripts in a document tree only // dynamic markup insertion Document open(optional DOMString type = "text/html", optional DOMString replace = ""); WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false); - void close(); - void write(DOMString... text); - void writeln(DOMString... text); + [CEReactions] void close(); + [CEReactions] void write(DOMString... text); + [CEReactions] void writeln(DOMString... text); // user interaction readonly attribute WindowProxy? defaultView; readonly attribute Element? activeElement; boolean hasFocus(); - attribute DOMString designMode; - boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = ""); + [CEReactions] attribute DOMString designMode; + [CEReactions] boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = ""); boolean queryCommandEnabled(DOMString commandId); boolean queryCommandIndeterm(DOMString commandId); boolean queryCommandState(DOMString commandId); boolean queryCommandSupported(DOMString commandId); DOMString queryCommandValue(DOMString commandId); @@ -1967,41 +1889,45 @@ [LenientThis] attribute EventHandler onreadystatechange; }; Document implements GlobalEventHandlers; Document implements DocumentAndElementEventHandlers; -partial interface XMLDocument { - boolean load(DOMString url); -}; - +[HTMLConstructor] interface HTMLElement : Element { // metadata attributes - attribute DOMString title; - attribute DOMString lang; - attribute boolean translate; - attribute DOMString dir; + [CEReactions] attribute DOMString title; + [CEReactions] attribute DOMString lang; + [CEReactions] attribute boolean translate; + [CEReactions] attribute DOMString dir; [SameObject] readonly attribute DOMStringMap dataset; // user interaction - attribute boolean hidden; + [CEReactions] attribute boolean hidden; void click(); - attribute long tabIndex; + [CEReactions] attribute long tabIndex; void focus(); void blur(); - attribute DOMString accessKey; - attribute boolean draggable; - [PutForwards=value] readonly attribute DOMTokenList dropzone; - attribute HTMLMenuElement? contextMenu; - attribute boolean spellcheck; + [CEReactions] attribute DOMString accessKey; + [CEReactions] attribute boolean draggable; + [CEReactions] attribute boolean spellcheck; void forceSpellCheck(); + [CEReactions, TreatNullAs=EmptyString] attribute DOMString innerText; }; HTMLElement implements GlobalEventHandlers; HTMLElement implements DocumentAndElementEventHandlers; HTMLElement implements ElementContentEditable; +// Note: intentionally not [HTMLConstructor] interface HTMLUnknownElement : HTMLElement { }; +[OverrideBuiltins] +interface DOMStringMap { + getter DOMString (DOMString name); + [CEReactions] setter void (DOMString name, DOMString value); + [CEReactions] deleter void (DOMString name); +}; + interface HTMLHtmlElement : HTMLElement {}; interface HTMLHeadElement : HTMLElement {}; interface HTMLTitleElement : HTMLElement { @@ -2012,21 +1938,23 @@ attribute DOMString href; attribute DOMString target; }; interface HTMLLinkElement : HTMLElement { - attribute DOMString href; - attribute DOMString? crossOrigin; - attribute DOMString rel; - attribute DOMString rev; - [SameObject, PutForwards=value]readonly attribute DOMTokenList relList; - attribute DOMString media; - attribute DOMString hreflang; - attribute DOMString type; - [SameObject, PutForwards=value] readonly attribute DOMTokenList sizes; + [CEReactions] attribute USVString href; + [CEReactions] attribute DOMString? crossOrigin; + [CEReactions] attribute DOMString rel; + [CEReactions] attribute DOMString rev; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList relList; + [CEReactions] attribute DOMString media; + [CEReactions] attribute DOMString nonce; + [CEReactions] attribute DOMString hreflang; + [CEReactions] attribute DOMString type; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList sizes; + [CEReactions] attribute DOMString referrerPolicy; }; -HTMLLinkElement implements LinkStyle; + HTMLLinkElement implements LinkStyle; interface HTMLMetaElement : HTMLElement { attribute DOMString name; attribute DOMString httpEquiv; attribute DOMString content; @@ -2078,10 +2006,11 @@ attribute DOMString rev; [SameObject, PutForwards=value] readonly attribute DOMTokenList relList; attribute DOMString hreflang; attribute DOMString type; attribute DOMString text; + attribute DOMString referrerPolicy; }; HTMLAnchorElement implements HTMLHyperlinkElementUtils; interface HTMLDataElement : HTMLElement { attribute DOMString value; @@ -2100,11 +2029,13 @@ attribute DOMString dateTime; }; interface HTMLPictureElement : HTMLElement {}; -partial interface HTMLSourceElement { +interface HTMLSourceElement : HTMLElement { + attribute DOMString src; + attribute DOMString type; attribute DOMString srcset; attribute DOMString sizes; attribute DOMString media; }; @@ -2114,27 +2045,31 @@ attribute DOMString src; attribute DOMString srcset; attribute DOMString sizes; attribute DOMString? crossOrigin; attribute DOMString useMap; + attribute DOMString longDesc; 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; readonly attribute DOMString currentSrc; + attribute DOMString referrerPolicy; }; interface HTMLIFrameElement : HTMLElement { attribute DOMString src; attribute DOMString srcdoc; attribute DOMString name; - [PutForwards=value] readonly attribute DOMTokenList sandbox; + [SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox; attribute boolean allowFullscreen; + attribute boolean allowPaymentRequest; attribute DOMString width; attribute DOMString height; + attribute DOMString referrerPolicy; readonly attribute Document? contentDocument; readonly attribute WindowProxy? contentWindow; }; interface HTMLEmbedElement : HTMLElement { @@ -2180,15 +2115,10 @@ }; [NamedConstructor=Audio(optional DOMString src)] interface HTMLAudioElement : HTMLMediaElement {}; -interface HTMLSourceElement : HTMLElement { - attribute DOMString src; - attribute DOMString type; -}; - interface HTMLTrackElement : HTMLElement { attribute DOMString kind; attribute DOMString src; attribute DOMString srclang; attribute DOMString label; @@ -2376,11 +2306,11 @@ interface TrackEvent : Event { readonly attribute (VideoTrack or AudioTrack or TextTrack)? track; }; dictionary TrackEventInit : EventInit { - (VideoTrack or AudioTrack or TextTrack)? track; + (VideoTrack or AudioTrack or TextTrack)? track = null; }; interface HTMLMapElement : HTMLElement { attribute DOMString name; [SameObject] readonly attribute HTMLCollection areas; @@ -2392,13 +2322,14 @@ attribute DOMString coords; attribute DOMString shape; attribute DOMString target; attribute DOMString download; attribute DOMString rel; - readonly attribute DOMTokenList relList; + [SameObject, PutForwards=value] readonly attribute DOMTokenList relList; attribute DOMString hreflang; attribute DOMString type; + attribute DOMString referrerPolicy; }; HTMLAreaElement implements HTMLHyperlinkElementUtils; [NoInterfaceObject] interface HTMLHyperlinkElementUtils { @@ -2460,11 +2391,11 @@ }; interface HTMLTableCellElement : HTMLElement { attribute unsigned long colSpan; attribute unsigned long rowSpan; - [PutForwards=value] readonly attribute DOMTokenList headers; + [SameObject, PutForwards=value] readonly attribute DOMTokenList headers; readonly attribute long cellIndex; }; [OverrideBuiltins] interface HTMLFormElement : HTMLElement { @@ -2511,22 +2442,21 @@ attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; - attribute DOMString inputMode; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute long minLength; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; - attribute boolean required; + attribute boolean _required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; @@ -2546,13 +2476,13 @@ void setCustomValidity(DOMString error); [SameObject] readonly attribute NodeList labels; void select(); - attribute unsigned long selectionStart; - attribute unsigned long selectionEnd; - attribute DOMString selectionDirection; + attribute unsigned long? selectionStart; + attribute unsigned long? selectionEnd; + attribute DOMString? selectionDirection; void setRangeText(DOMString replacement); void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); }; @@ -2566,11 +2496,10 @@ attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString name; attribute DOMString type; attribute DOMString value; - attribute HTMLMenuElement? menu; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); @@ -2585,11 +2514,11 @@ attribute boolean autofocus; attribute boolean disabled; readonly attribute HTMLFormElement? form; attribute boolean multiple; attribute DOMString name; - attribute boolean required; + attribute boolean _required; attribute unsigned long size; readonly attribute DOMString type; [SameObject] readonly attribute HTMLOptionsCollection options; @@ -2642,17 +2571,16 @@ attribute boolean autofocus; attribute unsigned long cols; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; - attribute DOMString inputMode; attribute long maxLength; attribute long minLength; attribute DOMString name; attribute DOMString placeholder; attribute boolean readOnly; - attribute boolean required; + attribute boolean _required; attribute unsigned long rows; attribute DOMString wrap; readonly attribute DOMString type; attribute DOMString defaultValue; @@ -2667,38 +2595,18 @@ void setCustomValidity(DOMString error); [SameObject] readonly attribute NodeList labels; void select(); - attribute unsigned long selectionStart; - attribute unsigned long selectionEnd; - attribute DOMString selectionDirection; + attribute unsigned long? selectionStart; + attribute unsigned long? selectionEnd; + attribute DOMString? selectionDirection; void setRangeText(DOMString replacement); void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); }; -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(); - boolean reportValidity(); - void setCustomValidity(DOMString error); - - [SameObject] readonly attribute NodeList labels; -}; - interface HTMLOutputElement : HTMLElement { [SameObject, PutForwards=value] readonly attribute DOMTokenList htmlFor; readonly attribute HTMLFormElement? form; attribute DOMString name; @@ -2777,34 +2685,18 @@ interface HTMLDetailsElement : HTMLElement { attribute boolean open; }; -interface HTMLMenuElement : HTMLElement { - attribute DOMString type; - attribute DOMString label; +interface HTMLDialogElement : HTMLElement { + attribute boolean open; + attribute DOMString returnValue; + void show(optional (MouseEvent or Element) anchor); + void showModal(optional (MouseEvent or Element) anchor); + void close(optional DOMString returnValue); }; -interface HTMLMenuItemElement : HTMLElement { - attribute DOMString type; - attribute DOMString label; - attribute DOMString icon; - attribute boolean disabled; - attribute boolean checked; - attribute DOMString radiogroup; - attribute boolean default; -}; - -[Constructor(DOMString type, optional RelatedEventInit eventInitDict)] -interface RelatedEvent : Event { - readonly attribute EventTarget? relatedTarget; -}; - -dictionary RelatedEventInit : EventInit { - EventTarget? relatedTarget; -}; - interface HTMLScriptElement : HTMLElement { attribute DOMString src; attribute DOMString type; attribute DOMString charset; attribute boolean async; @@ -2812,10 +2704,12 @@ attribute DOMString? crossOrigin; attribute DOMString text; attribute DOMString nonce; }; +[Exposed=Window, + HTMLConstructor] interface HTMLTemplateElement : HTMLElement { readonly attribute DocumentFragment content; }; typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext; @@ -2912,21 +2806,23 @@ [Replaceable] readonly attribute WindowProxy parent; readonly attribute Element? frameElement; WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "", optional boolean replace = false); getter WindowProxy (unsigned long index); getter object (DOMString name); +// Since this is the global object, the IDL named getter adds a NamedPropertiesObject exotic +// object on the prototype chain. Indeed, this does not make the global object an exotic object. +// Indexed access is taken care of by the WindowProxy exotic object. // the user agent readonly attribute Navigator navigator; // user prompts void alert(); void alert(DOMString message); boolean confirm(optional DOMString message = ""); DOMString? prompt(optional DOMString message = "", optional DOMString default = ""); void print(); -any showModalDialog(DOMString url, optional any argument); // deprecated unsigned long requestAnimationFrame(FrameRequestCallback callback); void cancelAnimationFrame(unsigned long handle); }; Window implements GlobalEventHandlers; @@ -2949,56 +2845,55 @@ void forward(); void pushState(any data, DOMString title, optional DOMString? url = null); void replaceState(any data, DOMString title, optional DOMString? url = null); }; -[Unforgeable] interface Location { - stringifier attribute USVString href; - readonly attribute USVString origin; - attribute USVString protocol; - attribute USVString host; - attribute USVString hostname; - attribute USVString port; - attribute USVString pathname; - attribute USVString search; - attribute USVString hash; + [Unforgeable] stringifier attribute USVString href; + [Unforgeable] readonly attribute USVString origin; + [Unforgeable] attribute USVString protocol; + [Unforgeable] attribute USVString host; + [Unforgeable] attribute USVString hostname; + [Unforgeable] attribute USVString port; + [Unforgeable] attribute USVString pathname; + [Unforgeable] attribute USVString search; + [Unforgeable] attribute USVString hash; - void assign(USVString url); - void replace(USVString url); - void reload(); + [Unforgeable] void assign(USVString url); + [Unforgeable] void replace(USVString url); + [Unforgeable] void reload(); - [SameObject] readonly attribute USVString[] ancestorOrigins; + [Unforgeable, SameObject] readonly attribute USVString[] ancestorOrigins; }; [Constructor(DOMString type, optional PopStateEventInit eventInitDict), Exposed=(Window,Worker)] interface PopStateEvent : Event { readonly attribute any state; }; dictionary PopStateEventInit : EventInit { - any state; + any state = null; }; [Constructor(DOMString type, optional HashChangeEventInit eventInitDict), Exposed=(Window,Worker)] interface HashChangeEvent : Event { - readonly attribute DOMString oldURL; - readonly attribute DOMString newURL; + readonly attribute USVString oldURL; + readonly attribute USVString newURL; }; dictionary HashChangeEventInit : EventInit { - DOMString oldURL; - DOMString newURL; + USVString oldURL = ""; + USVString newURL = ""; }; [Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), Exposed=(Window,Worker)] interface PageTransitionEvent : Event { readonly attribute boolean persisted; }; dictionary PageTransitionEventInit : EventInit { - boolean persisted; + boolean persisted = false; }; interface BeforeUnloadEvent : Event { attribute DOMString returnValue; }; @@ -3056,11 +2951,10 @@ attribute EventHandler oncanplay; attribute EventHandler oncanplaythrough; attribute EventHandler onchange; attribute EventHandler onclick; attribute EventHandler onclose; - attribute EventHandler oncontextmenu; attribute EventHandler oncuechange; attribute EventHandler ondblclick; attribute EventHandler ondrag; attribute EventHandler ondragend; attribute EventHandler ondragenter; @@ -3136,43 +3030,41 @@ attribute EventHandler oncopy; attribute EventHandler oncut; attribute EventHandler onpaste; }; +typedef (DOMString or Function) TimerHandler; + [NoInterfaceObject, Exposed=(Window, Worker)] -interface WindowBase64 { +interface WindowOrWorkerGlobalScope { + [Replaceable] readonly attribute USVString origin; + + // Base64 utility methods (WindowBase64) DOMString btoa(DOMString btoa); DOMString atob(DOMString atob); -}; -Window implements WindowBase64; -WorkerGlobalScope implements WindowBase64; -[NoInterfaceObject, Exposed=(Window,Worker)] -interface WindowTimers { + // Timers (WindowTimers) long setTimeout((Function or DOMString) handler, optional long timeout = 0, any... arguments); void clearTimeout(optional long handle = 0); long setInterval((Function or DOMString) handler, optional long timeout = 0, any... arguments); void clearInterval(optional long handle = 0); -}; -Window implements WindowTimers; -WorkerGlobalScope implements WindowTimers; -[NoInterfaceObject] -interface WindowModal { - readonly attribute any dialogArguments; - attribute any returnValue; + // ImageBitmap, Images (ImageBitmapFactories) + Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image); + Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh); }; +Window implements WindowOrWorkerGlobalScope; +WorkerGlobalScope implements WindowOrWorkerGlobalScope; interface Navigator { // objects implementing this interface also implement the interfaces given below }; Navigator implements NavigatorID; Navigator implements NavigatorLanguage; Navigator implements NavigatorOnLine; Navigator implements NavigatorContentUtils; Navigator implements NavigatorCookies; -Navigator implements NavigatorPlugins; [NoInterfaceObject, Exposed=(Window, Worker)] interface NavigatorID { [Exposed=Window] readonly attribute DOMString appCodeName; // constant "Mozilla" readonly attribute DOMString appName; // constant "Netscape" @@ -3190,55 +3082,23 @@ [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 NavigatorCookies { readonly attribute boolean cookieEnabled; }; -[NoInterfaceObject] - interface NavigatorPlugins { - [SameObject] readonly attribute PluginArray plugins; - [SameObject] readonly attribute MimeTypeArray mimeTypes; - boolean javaEnabled(); -}; - -interface PluginArray { - void refresh(optional boolean reload = false); - readonly attribute unsigned long length; - getter Plugin? item(unsigned long index); - getter Plugin? namedItem(DOMString name); -}; - -interface MimeTypeArray { - readonly attribute unsigned long length; - getter MimeType? item(unsigned long index); - getter MimeType? namedItem(DOMString name); -}; - -interface Plugin { - readonly attribute DOMString name; - readonly attribute DOMString description; - readonly attribute DOMString filename; - readonly attribute unsigned long length; - getter MimeType? item(unsigned long index); - getter MimeType? namedItem(DOMString name); -}; - -interface MimeType { - readonly attribute DOMString type; - readonly attribute DOMString description; - readonly attribute DOMString suffixes; // comma-separated - readonly attribute Plugin enabledPlugin; -}; - -[Exposed=(Window, Worker)] +[Exposed=(Window, Worker), Serializable, Transferable] interface ImageBitmap { readonly attribute unsigned long width; readonly attribute unsigned long height; }; @@ -3248,314 +3108,281 @@ Blob or ImageData or CanvasRenderingContext2D or ImageBitmap) ImageBitmapSource; -[NoInterfaceObject, Exposed=(Window, Worker)] -interface ImageBitmapFactories { - Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image); - Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh); -}; -Window implements ImageBitmapFactories; -WorkerGlobalScope implements ImageBitmapFactories; - +// Note: intentionally not [HTMLConstructor] interface HTMLAppletElement : HTMLElement { attribute DOMString align; attribute DOMString alt; attribute DOMString archive; attribute DOMString code; - attribute DOMString codeBase; + attribute USVString codeBase; attribute DOMString height; attribute unsigned long hspace; attribute DOMString name; - attribute DOMString _object; // the underscore is not part of the identifier + attribute USVString _object; // the underscore is not part of the identifier attribute unsigned long vspace; attribute DOMString width; }; +[HTMLConstructor] 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; + [CEReactions] attribute DOMString behavior; + [CEReactions] attribute DOMString bgColor; + [CEReactions] attribute DOMString direction; + [CEReactions] attribute DOMString height; + [CEReactions] attribute unsigned long hspace; + [CEReactions] attribute long loop; + [CEReactions] attribute unsigned long scrollAmount; + [CEReactions] attribute unsigned long scrollDelay; + [CEReactions] attribute boolean trueSpeed; + [CEReactions] attribute unsigned long vspace; + [CEReactions] attribute DOMString width; attribute EventHandler onbounce; attribute EventHandler onfinish; attribute EventHandler onstart; void start(); void stop(); }; +[HTMLConstructor] interface HTMLFrameSetElement : HTMLElement { - attribute DOMString cols; - attribute DOMString rows; + [CEReactions] attribute DOMString cols; + [CEReactions] attribute DOMString rows; }; HTMLFrameSetElement implements WindowEventHandlers; +[HTMLConstructor] interface HTMLFrameElement : HTMLElement { - attribute DOMString name; - attribute DOMString scrolling; - attribute DOMString src; - attribute DOMString frameBorder; - attribute boolean noResize; + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString scrolling; + [CEReactions] attribute USVString src; + [CEReactions] attribute DOMString frameBorder; + [CEReactions] attribute USVString longDesc; + [CEReactions] attribute boolean noResize; readonly attribute Document? contentDocument; readonly attribute WindowProxy? contentWindow; - [TreatNullAs=EmptyString] attribute DOMString marginHeight; - [TreatNullAs=EmptyString] attribute DOMString marginWidth; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginHeight; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginWidth; }; -[Exposed=(Window, SharedWorker)] -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 - attribute EventHandler onchecking; - attribute EventHandler onerror; - attribute EventHandler onnoupdate; - attribute EventHandler ondownloading; - attribute EventHandler onprogress; - attribute EventHandler onupdateready; - attribute EventHandler oncached; - attribute EventHandler onobsolete; -}; - partial interface HTMLAnchorElement { - attribute DOMString coords; - attribute DOMString charset; - attribute DOMString name; - attribute DOMString shape; + [CEReactions] attribute DOMString coords; + [CEReactions] attribute DOMString charset; + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString shape; }; partial interface HTMLAreaElement { - attribute boolean noHref; + [CEReactions] attribute boolean noHref; }; 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; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString text; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString link; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString vLink; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString aLink; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; attribute DOMString background; }; partial interface HTMLBRElement { - attribute DOMString clear; + [CEReactions] attribute DOMString clear; }; partial interface HTMLTableCaptionElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLTableColElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute DOMString vAlign; + [CEReactions] attribute DOMString width; }; +[HTMLConstructor] interface HTMLDirectoryElement : HTMLElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLDivElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLDListElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLEmbedElement { - attribute DOMString align; - attribute DOMString name; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString name; }; +[HTMLConstructor] interface HTMLFontElement : HTMLElement { - [TreatNullAs=EmptyString] attribute DOMString color; - attribute DOMString face; - attribute DOMString size; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString color; + [CEReactions] attribute DOMString face; + [CEReactions] attribute DOMString size; }; partial interface HTMLHeadingElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLHRElement { - attribute DOMString align; - attribute DOMString color; - attribute boolean noShade; - attribute DOMString size; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString color; + [CEReactions] attribute boolean noShade; + [CEReactions] attribute DOMString size; + [CEReactions] attribute DOMString width; }; partial interface HTMLHtmlElement { - attribute DOMString version; + [CEReactions] attribute DOMString version; }; partial interface HTMLIFrameElement { - attribute DOMString align; - attribute DOMString scrolling; - attribute DOMString frameBorder; - - [TreatNullAs=EmptyString] attribute DOMString marginHeight; - [TreatNullAs=EmptyString] attribute DOMString marginWidth; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString scrolling; + [CEReactions] attribute DOMString frameBorder; + [CEReactions] attribute USVString longDesc; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginHeight; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginWidth; }; partial interface HTMLImageElement { - attribute DOMString name; - attribute DOMString lowsrc; - attribute DOMString align; - attribute unsigned long hspace; - attribute unsigned long vspace; + [CEReactions] attribute DOMString name; + [CEReactions] attribute USVString lowsrc; + [CEReactions] attribute DOMString align; + [CEReactions] attribute unsigned long hspace; + [CEReactions] attribute unsigned long vspace; - [TreatNullAs=EmptyString] attribute DOMString border; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString border; }; partial interface HTMLInputElement { - attribute DOMString align; - attribute DOMString useMap; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString useMap; }; partial interface HTMLLegendElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLLIElement { - attribute DOMString type; + [CEReactions] attribute DOMString type; }; partial interface HTMLLinkElement { - attribute DOMString charset; - attribute DOMString target; + [CEReactions] attribute DOMString charset; + [CEReactions] attribute DOMString target; }; partial interface HTMLMenuElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLMetaElement { - attribute DOMString scheme; + [CEReactions] 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; - attribute DOMString useMap; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString archive; + [CEReactions] attribute DOMString code; + [CEReactions] attribute boolean declare; + [CEReactions] attribute unsigned long hspace; + [CEReactions] attribute DOMString standby; + [CEReactions] attribute unsigned long vspace; + [CEReactions] attribute DOMString codeBase; + [CEReactions] attribute DOMString codeType; - [TreatNullAs=EmptyString] attribute DOMString border; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString border; }; partial interface HTMLOListElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLParagraphElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLParamElement { - attribute DOMString type; - attribute DOMString valueType; + [CEReactions] attribute DOMString type; + [CEReactions] attribute DOMString valueType; }; partial interface HTMLPreElement { - attribute long width; + [CEReactions] attribute long width; }; partial interface HTMLScriptElement { - attribute DOMString event; - attribute DOMString htmlFor; + [CEReactions] attribute DOMString event; + [CEReactions] attribute DOMString htmlFor; }; partial interface HTMLTableElement { - attribute DOMString align; - attribute DOMString border; - attribute DOMString frame; - attribute DOMString rules; - attribute DOMString summary; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString border; + [CEReactions] attribute DOMString frame; + [CEReactions] attribute DOMString rules; + [CEReactions] attribute DOMString summary; + [CEReactions] attribute DOMString width; - [TreatNullAs=EmptyString] attribute DOMString bgColor; - [TreatNullAs=EmptyString] attribute DOMString cellPadding; - [TreatNullAs=EmptyString] attribute DOMString cellSpacing; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString cellPadding; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString cellSpacing; }; partial interface HTMLTableSectionElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute DOMString vAlign; }; partial interface HTMLTableCellElement { - attribute DOMString align; - attribute DOMString axis; - attribute DOMString height; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString axis; + [CEReactions] attribute DOMString height; + [CEReactions] attribute DOMString width; - attribute DOMString ch; - attribute DOMString chOff; - attribute boolean noWrap; - attribute DOMString vAlign; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute boolean noWrap; + [CEReactions] attribute DOMString vAlign; - [TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; }; -partial interface HTMLTableDataCellElement { - attribute DOMString abbr; -}; - partial interface HTMLTableRowElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute DOMString vAlign; - [TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; }; partial interface HTMLUListElement { - attribute boolean compact; - attribute DOMString type; + [CEReactions] attribute boolean compact; + [CEReactions] 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; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString fgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString linkColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString vlinkColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString alinkColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; [SameObject] readonly attribute HTMLCollection anchors; [SameObject] readonly attribute HTMLCollection applets; void clear(); @@ -3574,7 +3401,45 @@ [NoInterfaceObject] interface External { void AddSearchProvider(); void IsSearchProviderInstalled(); +}; + +Navigator implements NavigatorPlugins; + +[NoInterfaceObject] + interface NavigatorPlugins { + [SameObject] readonly attribute PluginArray plugins; + [SameObject] readonly attribute MimeTypeArray mimeTypes; + boolean javaEnabled(); +}; + +interface PluginArray { + void refresh(optional boolean reload = false); + readonly attribute unsigned long length; + getter Plugin? item(unsigned long index); + getter Plugin? namedItem(DOMString name); +}; + +interface MimeTypeArray { + readonly attribute unsigned long length; + getter MimeType? item(unsigned long index); + getter MimeType? namedItem(DOMString name); +}; + +interface Plugin { + readonly attribute DOMString name; + readonly attribute DOMString description; + readonly attribute DOMString filename; + readonly attribute unsigned long length; + getter MimeType? item(unsigned long index); + getter MimeType? namedItem(DOMString name); +}; + +interface MimeType { + readonly attribute DOMString type; + readonly attribute DOMString description; + readonly attribute DOMString suffixes; // comma-separated + readonly attribute Plugin enabledPlugin; };