1/*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 *    notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 *    notice, this list of conditions and the following disclaimer in the
11 *    documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26module window {
27
28    interface [
29        CheckDomainSecurity,
30        CustomDefineGetter,
31        CustomDefineSetter,
32        CustomDeleteProperty,
33        CustomGetOwnPropertySlot,
34        CustomGetPropertyNames,
35        CustomLookupGetter,
36        CustomLookupSetter,
37        CustomMarkFunction,
38        CustomNativeConverter,
39        CustomPutFunction,
40        EventTarget,
41        ExtendsDOMGlobalObject,
42        GenerateNativeConverter,
43        ReplaceableConstructor,
44        LegacyParent=JSDOMWindowBase
45    ] DOMWindow {
46        // DOM Level 0
47        attribute [Replaceable] Screen screen;
48        readonly attribute [DoNotCheckDomainSecurity, JSCCustomGetter] History history;
49        attribute [Replaceable] BarInfo locationbar;
50        attribute [Replaceable] BarInfo menubar;
51        attribute [Replaceable] BarInfo personalbar;
52        attribute [Replaceable] BarInfo scrollbars;
53        attribute [Replaceable] BarInfo statusbar;
54        attribute [Replaceable] BarInfo toolbar;
55        attribute [Replaceable] Navigator navigator;
56        attribute [Replaceable] Navigator clientInformation;
57        readonly attribute Crypto crypto;
58        attribute [DoNotCheckDomainSecurity, JSCCustom, V8CustomSetter, V8DisallowShadowing, CPPCustom] Location location;
59
60        attribute [Replaceable, CustomGetter, V8CustomSetter] Event event;
61
62
63        DOMSelection getSelection();
64
65        readonly attribute [CheckNodeSecurity] Element frameElement;
66
67        [DoNotCheckDomainSecurity] void focus();
68        [DoNotCheckDomainSecurity] void blur();
69        [DoNotCheckDomainSecurity, CallWith=ScriptExecutionContext] void close();
70
71        void print();
72        void stop();
73
74        [Custom] DOMWindow open(in DOMString url,
75                                in DOMString name,
76                                in [Optional] DOMString options);
77
78        [Custom] DOMObject showModalDialog(in DOMString url,
79                                           in [Optional] DOMObject dialogArgs,
80                                           in [Optional] DOMString featureArgs);
81
82        void alert(in DOMString message);
83        boolean confirm(in DOMString message);
84        [ConvertNullStringTo=Null] DOMString prompt(in DOMString message,
85                                                    in [ConvertUndefinedOrNullToNullString] DOMString defaultValue);
86
87        boolean find(in DOMString string,
88                     in boolean caseSensitive,
89                     in boolean backwards,
90                     in boolean wrap,
91                     in boolean wholeWord,
92                     in boolean searchInFrames,
93                     in boolean showDialog);
94
95        attribute [Replaceable] boolean offscreenBuffering;
96
97        attribute [Replaceable] long outerHeight;
98        attribute [Replaceable] long outerWidth;
99        attribute [Replaceable] long innerHeight;
100        attribute [Replaceable] long innerWidth;
101        attribute [Replaceable] long screenX;
102        attribute [Replaceable] long screenY;
103        attribute [Replaceable] long screenLeft;
104        attribute [Replaceable] long screenTop;
105        attribute [Replaceable] long scrollX;
106        attribute [Replaceable] long scrollY;
107        readonly attribute long pageXOffset;
108        readonly attribute long pageYOffset;
109
110        [RequiresAllArguments] void scrollBy(in long x, in long y);
111        [RequiresAllArguments] void scrollTo(in long x, in long y);
112        [RequiresAllArguments] void scroll(in long x, in long y);
113        [RequiresAllArguments] void moveBy(in float x, in float y); // FIXME: this should take longs not floats.
114        [RequiresAllArguments] void moveTo(in float x, in float y); // FIXME: this should take longs not floats.
115        [RequiresAllArguments] void resizeBy(in float x, in float y); // FIXME: this should take longs not floats.
116        [RequiresAllArguments] void resizeTo(in float width, in float height); // FIXME: this should take longs not floats.
117
118        readonly attribute [DoNotCheckDomainSecurity] boolean closed;
119
120        attribute [Replaceable, DoNotCheckDomainSecurityOnGet] unsigned long length;
121
122        attribute DOMString name;
123
124        attribute DOMString status;
125        attribute DOMString defaultStatus;
126#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
127        // This attribute is an alias of defaultStatus and is necessary for legacy uses.
128        attribute DOMString defaultstatus;
129#endif
130
131        // Self referential attributes
132        attribute [Replaceable, DoNotCheckDomainSecurityOnGet] DOMWindow self;
133        readonly attribute [DoNotCheckDomainSecurity, V8DisallowShadowing] DOMWindow window;
134        attribute [Replaceable, DoNotCheckDomainSecurityOnGet] DOMWindow frames;
135
136        attribute [Replaceable, DoNotCheckDomainSecurityOnGet, V8CustomSetter] DOMWindow opener;
137        attribute [Replaceable, DoNotCheckDomainSecurityOnGet] DOMWindow parent;
138        attribute [Replaceable, DoNotCheckDomainSecurityOnGet, V8DisallowShadowing, V8ReadOnly] DOMWindow top;
139
140        // DOM Level 2 AbstractView Interface
141        readonly attribute Document document;
142
143        // CSSOM View Module
144        MediaQueryList matchMedia(in DOMString query);
145
146        // styleMedia has been removed from the CSSOM View specification.
147        readonly attribute StyleMedia styleMedia;
148
149        // DOM Level 2 Style Interface
150        CSSStyleDeclaration getComputedStyle(in Element element,
151                                             in [ConvertUndefinedOrNullToNullString] DOMString pseudoElement);
152
153        // WebKit extensions
154#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
155        CSSRuleList getMatchedCSSRules(in Element element,
156                                       in DOMString pseudoElement);
157#endif
158
159        attribute [Replaceable] double devicePixelRatio;
160
161        WebKitPoint webkitConvertPointFromPageToNode(in Node node, in WebKitPoint p);
162        WebKitPoint webkitConvertPointFromNodeToPage(in Node node, in WebKitPoint p);
163
164#if defined(ENABLE_OFFLINE_WEB_APPLICATIONS) && ENABLE_OFFLINE_WEB_APPLICATIONS
165        readonly attribute [EnabledAtRuntime] DOMApplicationCache applicationCache;
166#endif
167#if defined(ENABLE_DATABASE) && ENABLE_DATABASE
168        [EnabledAtRuntime, RequiresAllArguments=Raise] Database openDatabase(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize, in [Callback, Optional] DatabaseCallback creationCallback)
169            raises(DOMException);
170#endif
171#if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE
172        readonly attribute [EnabledAtRuntime] Storage sessionStorage
173            getter raises(DOMException);
174        readonly attribute [EnabledAtRuntime] Storage localStorage
175            getter raises(DOMException);
176#endif
177#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
178        readonly attribute [EnabledAtRuntime] NotificationCenter webkitNotifications;
179#endif
180#if defined(ENABLE_INDEXED_DATABASE) && ENABLE_INDEXED_DATABASE
181        readonly attribute [EnabledAtRuntime] IDBFactory webkitIndexedDB;
182
183        attribute [EnabledAtRuntime] IDBCursorConstructor webkitIDBCursor;
184        attribute [EnabledAtRuntime] IDBDatabaseConstructor webkitIDBDatabase;
185        attribute [EnabledAtRuntime] IDBDatabaseErrorConstructor webkitIDBDatabaseError;
186        attribute [EnabledAtRuntime] IDBDatabaseExceptionConstructor webkitIDBDatabaseException;
187        attribute [EnabledAtRuntime] IDBFactoryConstructor webkitIDBFactory;
188        attribute [EnabledAtRuntime] IDBIndexConstructor webkitIDBIndex;
189        attribute [EnabledAtRuntime] IDBKeyRangeConstructor webkitIDBKeyRange;
190        attribute [EnabledAtRuntime] IDBObjectStoreConstructor webkitIDBObjectStore;
191        attribute [EnabledAtRuntime] IDBRequestConstructor webkitIDBRequest;
192        attribute [EnabledAtRuntime] IDBTransactionConstructor webkitIDBTransaction;
193#endif
194#if defined(ENABLE_FILE_SYSTEM) && ENABLE_FILE_SYSTEM
195        const unsigned short TEMPORARY = 0;
196        const unsigned short PERSISTENT = 1;
197        [EnabledAtRuntime=FileSystem] void webkitRequestFileSystem(in unsigned short type, in long long size, in [Callback, Optional] FileSystemCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
198        [EnabledAtRuntime=FileSystem] void webkitResolveLocalFileSystemURL(in DOMString url, in [Callback, Optional] EntryCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
199
200        attribute [EnabledAtRuntime=FileSystem] WebKitFlagsConstructor WebKitFlags;
201#endif
202
203#if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS
204        // This is the interface orientation in degrees. Some examples are:
205        //  0 is straight up; -90 is when the device is rotated 90 clockwise;
206        //  90 is when rotated counter clockwise.
207        readonly attribute long orientation;
208#endif
209
210                 attribute [Replaceable] Console console;
211
212        // cross-document messaging
213#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
214        [DoNotCheckDomainSecurity, Custom] void postMessage(in SerializedScriptValue message, in [Optional] Array messagePorts, in DOMString targetOrigin)
215            raises(DOMException);
216#else
217        // There's no good way to expose an array via the ObjC bindings, so for now just allow passing in a single port.
218        [DoNotCheckDomainSecurity, Custom] void postMessage(in SerializedScriptValue message, in [Optional] MessagePort messagePort, in DOMString targetOrigin)
219            raises(DOMException);
220#endif
221
222#if defined(ENABLE_WEB_TIMING) && ENABLE_WEB_TIMING
223        attribute [Replaceable] Performance performance;
224#endif
225
226        // Timers
227        [Custom] long setTimeout(in TimeoutHandler handler, in long timeout);
228        // [Custom] long setTimeout(in TimeoutHandler handler, in long timeout, arguments...);
229        // [Custom] long setTimeout(in DOMString code, in long timeout);
230        void clearTimeout(in long handle);
231        [Custom] long setInterval(in TimeoutHandler handler, in long timeout);
232        // [Custom] long setInterval(in TimeoutHandler handler, in long timeout, arguments...);
233        // [Custom] long setInterval(in DOMString code, in long timeout);
234        void clearInterval(in long handle);
235
236#if defined(ENABLE_REQUEST_ANIMATION_FRAME)
237        // WebKit animation extensions
238        long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback, in Element element);
239        void webkitCancelRequestAnimationFrame(in long id);
240#endif
241
242        // Base64
243        DOMString atob(in [ConvertNullToNullString] DOMString string)
244            raises(DOMException);
245        DOMString btoa(in [ConvertNullToNullString] DOMString string)
246            raises(DOMException);
247
248        // Events
249
250        attribute EventListener onabort;
251        attribute EventListener onbeforeunload;
252        attribute EventListener onblur;
253        attribute EventListener oncanplay;
254        attribute EventListener oncanplaythrough;
255        attribute EventListener onchange;
256        attribute EventListener onclick;
257        attribute EventListener oncontextmenu;
258        attribute EventListener ondblclick;
259        attribute EventListener ondrag;
260        attribute EventListener ondragend;
261        attribute EventListener ondragenter;
262        attribute EventListener ondragleave;
263        attribute EventListener ondragover;
264        attribute EventListener ondragstart;
265        attribute EventListener ondrop;
266        attribute EventListener ondurationchange;
267        attribute EventListener onemptied;
268        attribute EventListener onended;
269        attribute EventListener onerror;
270        attribute EventListener onfocus;
271        attribute EventListener onhashchange;
272        attribute EventListener oninput;
273        attribute EventListener oninvalid;
274        attribute EventListener onkeydown;
275        attribute EventListener onkeypress;
276        attribute EventListener onkeyup;
277        attribute EventListener onload;
278        attribute EventListener onloadeddata;
279        attribute EventListener onloadedmetadata;
280        attribute EventListener onloadstart;
281        attribute EventListener onmessage;
282        attribute EventListener onmousedown;
283        attribute EventListener onmousemove;
284        attribute EventListener onmouseout;
285        attribute EventListener onmouseover;
286        attribute EventListener onmouseup;
287        attribute EventListener onmousewheel;
288        attribute EventListener onoffline;
289        attribute EventListener ononline;
290        attribute EventListener onpagehide;
291        attribute EventListener onpageshow;
292        attribute EventListener onpause;
293        attribute EventListener onplay;
294        attribute EventListener onplaying;
295        attribute EventListener onpopstate;
296        attribute EventListener onprogress;
297        attribute EventListener onratechange;
298        attribute EventListener onresize;
299        attribute EventListener onscroll;
300        attribute EventListener onseeked;
301        attribute EventListener onseeking;
302        attribute EventListener onselect;
303        attribute EventListener onstalled;
304        attribute EventListener onstorage;
305        attribute EventListener onsubmit;
306        attribute EventListener onsuspend;
307        attribute EventListener ontimeupdate;
308        attribute EventListener onunload;
309        attribute EventListener onvolumechange;
310        attribute EventListener onwaiting;
311
312        // Not implemented yet.
313        // attribute EventListener onafterprint;
314        // attribute EventListener onbeforeprint;
315        // attribute EventListener onreadystatechange;
316        // attribute EventListener onredo;
317        // attribute EventListener onshow;
318        // attribute EventListener onundo;
319
320        // Webkit extensions
321        attribute EventListener onreset;
322        attribute EventListener onsearch;
323        attribute EventListener onwebkitanimationend;
324        attribute EventListener onwebkitanimationiteration;
325        attribute EventListener onwebkitanimationstart;
326        attribute EventListener onwebkittransitionend;
327#if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS
328        attribute EventListener onorientationchange;
329#endif
330        attribute [Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchstart;
331        attribute [Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchmove;
332        attribute [Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchend;
333        attribute [Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchcancel;
334
335        attribute [Conditional=DEVICE_ORIENTATION,EnabledAtRuntime] DeviceMotionEventConstructor DeviceMotionEvent;
336        attribute [Conditional=DEVICE_ORIENTATION,EnabledAtRuntime] EventListener ondevicemotion;
337        attribute [Conditional=DEVICE_ORIENTATION,EnabledAtRuntime] DeviceOrientationEventConstructor DeviceOrientationEvent;
338        attribute [Conditional=DEVICE_ORIENTATION,EnabledAtRuntime] EventListener ondeviceorientation;
339
340        // EventTarget interface
341        [Custom] void addEventListener(in DOMString type,
342                                      in EventListener listener,
343                                      in boolean useCapture);
344        [Custom] void removeEventListener(in DOMString type,
345                                          in EventListener listener,
346                                          in boolean useCapture);
347        boolean dispatchEvent(in Event evt)
348            raises(EventException);
349
350        [V8Custom=DOMWindowNOP] void captureEvents(/*in long eventFlags*/);
351        [V8Custom=DOMWindowNOP] void releaseEvents(/*in long eventFlags*/);
352
353#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
354        // Global constructors
355        attribute StyleSheetConstructor StyleSheet;
356        attribute CSSStyleSheetConstructor CSSStyleSheet;
357
358        attribute CSSValueConstructor CSSValue;
359        attribute CSSPrimitiveValueConstructor CSSPrimitiveValue;
360        attribute CSSValueListConstructor CSSValueList;
361        attribute WebKitCSSTransformValueConstructor WebKitCSSTransformValue;
362
363        attribute CSSRuleConstructor CSSRule;
364        attribute CSSCharsetRuleConstructor CSSCharsetRule;
365        attribute CSSFontFaceRuleConstructor CSSFontFaceRule;
366        attribute CSSImportRuleConstructor CSSImportRule;
367        attribute CSSMediaRuleConstructor CSSMediaRule;
368        attribute CSSPageRuleConstructor CSSPageRule;
369        attribute CSSStyleRuleConstructor CSSStyleRule;
370
371        attribute CSSStyleDeclarationConstructor CSSStyleDeclaration;
372        attribute MediaListConstructor MediaList;
373        attribute CounterConstructor Counter;
374        attribute CSSRuleListConstructor CSSRuleList;
375        attribute RectConstructor Rect;
376        attribute RGBColorConstructor RGBColor;
377        attribute StyleSheetListConstructor StyleSheetList;
378
379        // FIXME: Implement the commented-out global constructors for interfaces listed in DOM Level 3 Core specification.
380        attribute DOMCoreExceptionConstructor DOMException;
381        attribute DOMStringListConstructor DOMStringList;
382//        attribute NameListConstructor NameList;
383//        attribute DOMImplementationListConstructor DOMImplementationList;
384//        attribute DOMImplementationSourceConstructor DOMImplementationSource;
385        attribute DOMImplementationConstructor DOMImplementation;
386        attribute DOMSettableTokenListConstructor DOMSettableTokenList;
387        attribute DOMTokenListConstructor DOMTokenList;
388        attribute DocumentFragmentConstructor DocumentFragment;
389        attribute DocumentConstructor Document;
390        attribute NodeConstructor Node;
391        attribute NodeListConstructor NodeList;
392        attribute NamedNodeMapConstructor NamedNodeMap;
393        attribute CharacterDataConstructor CharacterData;
394        attribute AttrConstructor Attr;
395        attribute ElementConstructor Element;
396        attribute TextConstructor Text;
397        attribute CommentConstructor Comment;
398//        attribute TypeInfoConstructor TypeInfo;
399//        attribute UserDataHandlerConstructor UserDataHandler;
400//        attribute DOMErrorConstructor DOMError;
401//        attribute DOMErrorHandlerConstructor DOMErrorHandler
402//        attribute DOMLocatorConstructor DOMLocator;
403//        attribute DOMConfigurationConstructor DOMConfiguration;
404        attribute CDATASectionConstructor CDATASection;
405        attribute DocumentTypeConstructor DocumentType;
406        attribute NotationConstructor Notation;
407        attribute EntityConstructor Entity;
408        attribute EntityReferenceConstructor EntityReference;
409        attribute ProcessingInstructionConstructor ProcessingInstruction;
410
411        attribute HTMLDocumentConstructor HTMLDocument;
412
413        attribute HTMLElementConstructor HTMLElement;
414        attribute HTMLAnchorElementConstructor HTMLAnchorElement;
415        attribute HTMLAppletElementConstructor HTMLAppletElement;
416        attribute HTMLAreaElementConstructor HTMLAreaElement;
417        attribute HTMLBRElementConstructor HTMLBRElement;
418        attribute HTMLBaseElementConstructor HTMLBaseElement;
419        attribute HTMLBaseFontElementConstructor HTMLBaseFontElement;
420        attribute HTMLBlockquoteElementConstructor HTMLBlockquoteElement;
421        attribute HTMLBodyElementConstructor HTMLBodyElement;
422        attribute HTMLButtonElementConstructor HTMLButtonElement;
423        attribute HTMLCanvasElementConstructor HTMLCanvasElement;
424        attribute [Conditional=DATAGRID] HTMLDataGridElementConstructor HTMLDataGridElement;
425        attribute [Conditional=DATAGRID] HTMLDataGridCellElementConstructor HTMLDataGridCellElement;
426        attribute [Conditional=DATAGRID] HTMLDataGridColElementConstructor HTMLDataGridColElement;
427        attribute HTMLDListElementConstructor HTMLDListElement;
428        attribute HTMLDirectoryElementConstructor HTMLDirectoryElement;
429        attribute HTMLDivElementConstructor HTMLDivElement;
430        attribute HTMLEmbedElementConstructor HTMLEmbedElement;
431        attribute HTMLFieldSetElementConstructor HTMLFieldSetElement;
432        attribute HTMLFontElementConstructor HTMLFontElement;
433        attribute HTMLFormElementConstructor HTMLFormElement;
434        attribute HTMLFrameElementConstructor HTMLFrameElement;
435        attribute HTMLFrameSetElementConstructor HTMLFrameSetElement;
436        attribute HTMLHRElementConstructor HTMLHRElement;
437        attribute HTMLHeadElementConstructor HTMLHeadElement;
438        attribute HTMLHeadingElementConstructor HTMLHeadingElement;
439        attribute HTMLHtmlElementConstructor HTMLHtmlElement;
440        attribute HTMLIFrameElementConstructor HTMLIFrameElement;
441        attribute HTMLImageElementConstructor HTMLImageElement;
442        attribute HTMLInputElementConstructor HTMLInputElement;
443        attribute HTMLIsIndexElementConstructor HTMLIsIndexElement;
444        attribute HTMLKeygenElementConstructor HTMLKeygenElement;
445        attribute HTMLLIElementConstructor HTMLLIElement;
446        attribute HTMLLabelElementConstructor HTMLLabelElement;
447        attribute HTMLLegendElementConstructor HTMLLegendElement;
448        attribute HTMLLinkElementConstructor HTMLLinkElement;
449        attribute HTMLMapElementConstructor HTMLMapElement;
450        attribute HTMLMarqueeElementConstructor HTMLMarqueeElement;
451        attribute HTMLMenuElementConstructor HTMLMenuElement;
452        attribute HTMLMetaElementConstructor HTMLMetaElement;
453#if defined(ENABLE_METER_TAG) && ENABLE_METER_TAG
454        attribute HTMLMeterElementConstructor HTMLMeterElement;
455#endif
456        attribute HTMLModElementConstructor HTMLModElement;
457        attribute HTMLOListElementConstructor HTMLOListElement;
458        attribute HTMLObjectElementConstructor HTMLObjectElement;
459        attribute HTMLOptGroupElementConstructor HTMLOptGroupElement;
460        attribute HTMLOptionElementConstructor HTMLOptionElement;
461        attribute HTMLOutputElementConstructor HTMLOutputElement;
462        attribute HTMLParagraphElementConstructor HTMLParagraphElement;
463        attribute HTMLParamElementConstructor HTMLParamElement;
464        attribute HTMLPreElementConstructor HTMLPreElement;
465#if defined(ENABLE_PROGRESS_TAG) && ENABLE_PROGRESS_TAG
466        attribute HTMLProgressElementConstructor HTMLProgressElement;
467#endif
468        attribute HTMLQuoteElementConstructor HTMLQuoteElement;
469        attribute HTMLScriptElementConstructor HTMLScriptElement;
470        attribute HTMLSelectElementConstructor HTMLSelectElement;
471        attribute HTMLStyleElementConstructor HTMLStyleElement;
472        attribute HTMLTableCaptionElementConstructor HTMLTableCaptionElement;
473        attribute HTMLTableCellElementConstructor HTMLTableCellElement;
474        attribute HTMLTableColElementConstructor HTMLTableColElement;
475        attribute HTMLTableElementConstructor HTMLTableElement;
476        attribute HTMLTableRowElementConstructor HTMLTableRowElement;
477        attribute HTMLTableSectionElementConstructor HTMLTableSectionElement;
478        attribute HTMLTextAreaElementConstructor HTMLTextAreaElement;
479        attribute HTMLTitleElementConstructor HTMLTitleElement;
480        attribute HTMLUListElementConstructor HTMLUListElement;
481
482        attribute HTMLCollectionConstructor HTMLCollection;
483        attribute HTMLAllCollectionConstructor HTMLAllCollection;
484
485        attribute [CustomGetter] HTMLImageElementConstructor Image; // Usable with new operator
486        attribute [CustomGetter] HTMLOptionElementConstructor Option; // Usable with new operator
487
488        attribute CanvasPatternConstructor CanvasPattern;
489        attribute CanvasGradientConstructor CanvasGradient;
490        attribute CanvasRenderingContext2DConstructor CanvasRenderingContext2D;
491        attribute ImageDataConstructor ImageData;
492        attribute [Conditional=WEBGL] WebGLActiveInfoConstructor WebGLActiveInfo;
493        attribute [Conditional=WEBGL] WebGLBufferConstructor WebGLBuffer;
494        attribute [Conditional=WEBGL] WebGLFramebufferConstructor WebGLFramebuffer;
495        attribute [Conditional=WEBGL] WebGLProgramConstructor WebGLProgram;
496        attribute [Conditional=WEBGL] WebGLRenderbufferConstructor WebGLRenderbuffer;
497        attribute [Conditional=WEBGL] WebGLRenderingContextConstructor WebGLRenderingContext;
498        attribute [Conditional=WEBGL] WebGLShaderConstructor WebGLShader;
499        attribute [Conditional=WEBGL] WebGLTextureConstructor WebGLTexture;
500        attribute [Conditional=WEBGL] WebGLUniformLocationConstructor WebGLUniformLocation;
501        attribute TextMetricsConstructor TextMetrics;
502
503        attribute DOMStringMapConstructor DOMStringMap;
504
505        attribute [JSCCustomGetter] ArrayBufferConstructor ArrayBuffer; // Usable with new operator
506        attribute [JSCCustomGetter] Int8ArrayConstructor Int8Array; // Usable with new operator
507        attribute [JSCCustomGetter] Uint8ArrayConstructor Uint8Array; // Usable with new operator
508        attribute [JSCCustomGetter] Int16ArrayConstructor Int16Array; // Usable with new operator
509        attribute [JSCCustomGetter] Uint16ArrayConstructor Uint16Array; // Usable with new operator
510        attribute [JSCCustomGetter] Int32ArrayConstructor Int32Array; // Usable with new operator
511        attribute [JSCCustomGetter] Uint32ArrayConstructor Uint32Array; // Usable with new operator
512        attribute [JSCCustomGetter] Float32ArrayConstructor Float32Array; // Usable with new operator
513        attribute [JSCCustomGetter] Float64ArrayConstructor Float64Array; // Usable with new operator
514        attribute [JSCCustomGetter] DataViewConstructor DataView; // Usable with new operator
515
516        attribute [JSCCustomGetter,Conditional=WEB_AUDIO,EnabledAtRuntime] AudioContextConstructor webkitAudioContext; // Usable with new operator
517        attribute [Conditional=WEB_AUDIO] AudioPannerNodeConstructor webkitAudioPannerNode; // Needed for panning model constants
518
519        attribute EventConstructor Event;
520        attribute BeforeLoadEventConstructor BeforeLoadEvent;
521        attribute HashChangeEventConstructor HashChangeEvent;
522        attribute KeyboardEventConstructor KeyboardEvent;
523        attribute MouseEventConstructor MouseEvent;
524        attribute MutationEventConstructor MutationEvent;
525        attribute OverflowEventConstructor OverflowEvent;
526        attribute PageTransitionEventConstructor PageTransitionEvent;
527        attribute ProgressEventConstructor ProgressEvent;
528        attribute TextEventConstructor TextEvent;
529        attribute UIEventConstructor UIEvent;
530        attribute WebKitAnimationEventConstructor WebKitAnimationEvent;
531        attribute WebKitTransitionEventConstructor WebKitTransitionEvent;
532        attribute WheelEventConstructor WheelEvent;
533        attribute MessageEventConstructor MessageEvent;
534        attribute EventExceptionConstructor EventException;
535
536        attribute WebKitCSSKeyframeRuleConstructor WebKitCSSKeyframeRule;
537        attribute WebKitCSSKeyframesRuleConstructor WebKitCSSKeyframesRule;
538
539        attribute [JSCCustomGetter] WebKitCSSMatrixConstructor WebKitCSSMatrix; // Usable with the new operator
540
541        attribute [JSCCustomGetter] WebKitPointConstructor WebKitPoint; // Usable with new the operator
542
543        attribute ClipboardConstructor Clipboard;
544
545        attribute FileConstructor File;
546        attribute FileListConstructor FileList;
547        attribute BlobConstructor Blob;
548
549        attribute NodeFilterConstructor NodeFilter;
550        attribute RangeConstructor Range;
551        attribute RangeExceptionConstructor RangeException;
552
553#if ENABLE_EVENTSOURCE
554        attribute [JSCCustomGetter] EventSourceConstructor EventSource; // Usable with new the operator
555#endif
556
557        // Mozilla has a separate XMLDocument object for XML documents.
558        // We just use Document for this.
559        attribute DocumentConstructor XMLDocument;
560
561        attribute DOMParserConstructor DOMParser;
562        attribute XMLSerializerConstructor XMLSerializer;
563
564        attribute [JSCCustomGetter] XMLHttpRequestConstructor XMLHttpRequest; // Usable with the new operator
565        attribute XMLHttpRequestUploadConstructor XMLHttpRequestUpload;
566        attribute XMLHttpRequestExceptionConstructor XMLHttpRequestException;
567
568        attribute [JSCCustomGetter,Conditional=XSLT] XSLTProcessorConstructor XSLTProcessor; // Usable with the new operator
569
570#if defined(ENABLE_CHANNEL_MESSAGING) && ENABLE_CHANNEL_MESSAGING
571        attribute MessagePortConstructor MessagePort;
572        attribute [JSCCustomGetter] MessageChannelConstructor MessageChannel; // Usable with the new operator
573#endif
574
575#if defined(ENABLE_WORKERS) && ENABLE_WORKERS
576        attribute [JSCCustomGetter] WorkerConstructor Worker; // Usable with the new operator
577#endif
578
579#if defined(ENABLE_SHARED_WORKERS) && ENABLE_SHARED_WORKERS
580        attribute [JSCCustomGetter, EnabledAtRuntime] SharedWorkerConstructor SharedWorker; // Usable with the new operator
581#endif
582
583#if defined(ENABLE_WEB_SOCKETS) && ENABLE_WEB_SOCKETS
584        attribute [JSCCustomGetter,EnabledAtRuntime] WebSocketConstructor WebSocket; // Usable with the new operator
585#endif
586
587        attribute DOMPluginConstructor Plugin;
588        attribute DOMPluginArrayConstructor PluginArray;
589
590        attribute DOMMimeTypeConstructor MimeType;
591        attribute DOMMimeTypeArrayConstructor MimeTypeArray;
592
593        attribute ClientRectConstructor ClientRect;
594        attribute ClientRectListConstructor ClientRectList;
595
596#if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE
597        attribute StorageConstructor Storage;
598        attribute StorageEventConstructor StorageEvent;
599#endif
600
601        attribute [CustomGetter, Conditional=VIDEO, EnabledAtRuntime] HTMLAudioElementConstructor Audio; // Usable with the new operator
602        attribute [Conditional=VIDEO, EnabledAtRuntime] HTMLAudioElementConstructor HTMLAudioElement;
603        attribute [Conditional=VIDEO, EnabledAtRuntime] HTMLMediaElementConstructor HTMLMediaElement;
604        attribute [Conditional=VIDEO, EnabledAtRuntime] HTMLVideoElementConstructor HTMLVideoElement;
605        attribute [Conditional=VIDEO, EnabledAtRuntime] MediaErrorConstructor MediaError;
606        attribute [Conditional=VIDEO, EnabledAtRuntime] TimeRangesConstructor TimeRanges;
607
608        attribute WebKitAnimationConstructor WebKitAnimation;
609        attribute WebKitAnimationListConstructor WebKitAnimationList;
610
611#if defined(ENABLE_XPATH) && ENABLE_XPATH
612        attribute XPathEvaluatorConstructor XPathEvaluator;
613        attribute XPathResultConstructor XPathResult;
614        attribute XPathExceptionConstructor XPathException;
615#endif
616
617#if defined(ENABLE_SVG) && ENABLE_SVG
618        // Expose all implemented SVG 1.1 interfaces, excluding the SVG MI interfaces:
619        // SVGAnimatedPathData, SVGAnimatedPoints, SVGExternalResourcesRequired,
620        // SVGFilterPrimitiveStandardAttributes, SVGFitToViewBox, SVGLangSpace, SVGLocatable
621        // SVGStylable, SVGTests, SVGTransformable, SVGURIReference, SVGZoomAndPan
622        attribute SVGAElementConstructor SVGAElement;
623        attribute SVGAngleConstructor SVGAngle;
624        attribute SVGAnimatedAngleConstructor SVGAnimatedAngle;
625        attribute SVGAnimatedBooleanConstructor SVGAnimatedBoolean;
626        attribute SVGAnimatedEnumerationConstructor SVGAnimatedEnumeration;
627        attribute SVGAnimatedIntegerConstructor SVGAnimatedInteger;
628        attribute SVGAnimatedLengthConstructor SVGAnimatedLength;
629        attribute SVGAnimatedLengthListConstructor SVGAnimatedLengthList;
630        attribute SVGAnimatedNumberConstructor SVGAnimatedNumber;
631        attribute SVGAnimatedNumberListConstructor SVGAnimatedNumberList;
632        attribute SVGAnimatedPreserveAspectRatioConstructor SVGAnimatedPreserveAspectRatio;
633        attribute SVGAnimatedRectConstructor SVGAnimatedRect;
634        attribute SVGAnimatedStringConstructor SVGAnimatedString;
635        attribute SVGAnimatedTransformListConstructor SVGAnimatedTransformList;
636        attribute SVGCircleElementConstructor SVGCircleElement;
637        attribute SVGClipPathElementConstructor SVGClipPathElement;
638        attribute SVGColorConstructor SVGColor;
639        attribute SVGCursorElementConstructor SVGCursorElement;
640//      attribute SVGCSSRuleConstructor SVGCSSRule;
641        attribute SVGDefsElementConstructor SVGDefsElement;
642        attribute SVGDescElementConstructor SVGDescElement;
643        attribute SVGDocumentConstructor SVGDocument;
644        attribute SVGElementConstructor SVGElement;
645        attribute SVGElementInstanceConstructor SVGElementInstance;
646        attribute SVGElementInstanceListConstructor SVGElementInstanceList;
647        attribute SVGEllipseElementConstructor SVGEllipseElement;
648        attribute SVGExceptionConstructor SVGException;
649        attribute SVGGElementConstructor SVGGElement;
650        attribute SVGGradientElementConstructor SVGGradientElement;
651        attribute SVGImageElementConstructor SVGImageElement;
652        attribute SVGLengthConstructor SVGLength;
653        attribute SVGLengthListConstructor SVGLengthList;
654        attribute SVGLinearGradientElementConstructor SVGLinearGradientElement;
655        attribute SVGLineElementConstructor SVGLineElement;
656        attribute SVGMarkerElementConstructor SVGMarkerElement;
657        attribute SVGMaskElementConstructor SVGMaskElement;
658        attribute SVGMatrixConstructor SVGMatrix;
659        attribute SVGMetadataElementConstructor SVGMetadataElement;
660        attribute SVGNumberConstructor SVGNumber;
661        attribute SVGNumberListConstructor SVGNumberList;
662        attribute SVGPaintConstructor SVGPaint;
663        attribute SVGPathElementConstructor SVGPathElement;
664        attribute SVGPathSegConstructor SVGPathSeg;
665        attribute SVGPathSegArcAbsConstructor SVGPathSegArcAbs;
666        attribute SVGPathSegArcRelConstructor SVGPathSegArcRel;
667        attribute SVGPathSegClosePathConstructor SVGPathSegClosePath;
668        attribute SVGPathSegCurvetoCubicAbsConstructor SVGPathSegCurvetoCubicAbs;
669        attribute SVGPathSegCurvetoCubicRelConstructor SVGPathSegCurvetoCubicRel;
670        attribute SVGPathSegCurvetoCubicSmoothAbsConstructor SVGPathSegCurvetoCubicSmoothAbs;
671        attribute SVGPathSegCurvetoCubicSmoothRelConstructor SVGPathSegCurvetoCubicSmoothRel;
672        attribute SVGPathSegCurvetoQuadraticAbsConstructor SVGPathSegCurvetoQuadraticAbs;
673        attribute SVGPathSegCurvetoQuadraticRelConstructor SVGPathSegCurvetoQuadraticRel;
674        attribute SVGPathSegCurvetoQuadraticSmoothAbsConstructor SVGPathSegCurvetoQuadraticSmoothAbs;
675        attribute SVGPathSegCurvetoQuadraticSmoothRelConstructor SVGPathSegCurvetoQuadraticSmoothRel;
676        attribute SVGPathSegLinetoAbsConstructor SVGPathSegLinetoAbs;
677        attribute SVGPathSegLinetoHorizontalAbsConstructor SVGPathSegLinetoHorizontalAbs;
678        attribute SVGPathSegLinetoHorizontalRelConstructor SVGPathSegLinetoHorizontalRel;
679        attribute SVGPathSegLinetoRelConstructor SVGPathSegLinetoRel;
680        attribute SVGPathSegLinetoVerticalAbsConstructor SVGPathSegLinetoVerticalAbs;
681        attribute SVGPathSegLinetoVerticalRelConstructor SVGPathSegLinetoVerticalRel;
682        attribute SVGPathSegListConstructor SVGPathSegList;
683        attribute SVGPathSegMovetoAbsConstructor SVGPathSegMovetoAbs;
684        attribute SVGPathSegMovetoRelConstructor SVGPathSegMovetoRel;
685        attribute SVGPatternElementConstructor SVGPatternElement;
686        attribute SVGPointConstructor SVGPoint;
687        attribute SVGPointListConstructor SVGPointList;
688        attribute SVGPolygonElementConstructor SVGPolygonElement;
689        attribute SVGPolylineElementConstructor SVGPolylineElement;
690        attribute SVGPreserveAspectRatioConstructor SVGPreserveAspectRatio;
691        attribute SVGRadialGradientElementConstructor SVGRadialGradientElement;
692        attribute SVGRectConstructor SVGRect;
693        attribute SVGRectElementConstructor SVGRectElement;
694        attribute SVGRenderingIntentConstructor SVGRenderingIntent;
695        attribute SVGScriptElementConstructor SVGScriptElement;
696        attribute SVGStopElementConstructor SVGStopElement;
697        attribute SVGStringListConstructor SVGStringList;
698        attribute SVGStyleElementConstructor SVGStyleElement;
699        attribute SVGSVGElementConstructor SVGSVGElement;
700        attribute SVGSwitchElementConstructor SVGSwitchElement;
701        attribute SVGSymbolElementConstructor SVGSymbolElement;
702        attribute SVGTextContentElementConstructor SVGTextContentElement;
703        attribute SVGTextElementConstructor SVGTextElement;
704        attribute SVGTextPathElementConstructor SVGTextPathElement;
705        attribute SVGTextPositioningElementConstructor SVGTextPositioningElement;
706        attribute SVGTitleElementConstructor SVGTitleElement;
707        attribute SVGTransformConstructor SVGTransform;
708        attribute SVGTransformListConstructor SVGTransformList;
709        attribute SVGTRefElementConstructor SVGTRefElement;
710        attribute SVGTSpanElementConstructor SVGTSpanElement;
711        attribute SVGUnitTypesConstructor SVGUnitTypes;
712        attribute SVGUseElementConstructor SVGUseElement;
713        attribute SVGViewElementConstructor SVGViewElement;
714//      attribute SVGViewSpecConstructor SVGViewSpec;
715        attribute SVGZoomEventConstructor SVGZoomEvent;
716
717#if defined(ENABLE_SVG_ANIMATION) && ENABLE_SVG_ANIMATION
718        attribute SVGAnimateColorElementConstructor SVGAnimateColorElement;
719        attribute SVGAnimateElementConstructor SVGAnimateElement;
720//      attribute SVGAnimateMotionElementConstructor SVGAnimateMotionElement;
721        attribute SVGAnimateTransformElementConstructor SVGAnimateTransformElement;
722//      attribute SVGMPathElementConstructor SVGMPathElement;
723        attribute SVGSetElementConstructor SVGSetElement;
724#endif
725
726#if defined(ENABLE_SVG_FONTS) && ENABLE_SVG_FONTS
727//      attribute SVGAltGlyphDefElementConstructor SVGAltGlyphDefElement;
728        attribute SVGAltGlyphElementConstructor SVGAltGlyphElement;
729//      attribute SVGAltGlyphItemElementConstructor SVGAltGlyphItemElement;
730//      attribute SVGDefinitionSrcElementConstructor SVGDefinitionSrcElement;
731        attribute SVGFontElementConstructor SVGFontElement;
732        attribute SVGFontFaceElementConstructor SVGFontFaceElement;
733        attribute SVGFontFaceFormatElementConstructor SVGFontFaceFormatElement;
734        attribute SVGFontFaceNameElementConstructor SVGFontFaceNameElement;
735        attribute SVGFontFaceSrcElementConstructor SVGFontFaceSrcElement;
736        attribute SVGFontFaceUriElementConstructor SVGFontFaceUriElement;
737        attribute SVGGlyphElementConstructor SVGGlyphElement;
738//      attribute SVGGlyphRefElementConstructor SVGGlyphRefElement;
739        attribute SVGHKernElementConstructor SVGHKernElement;
740        attribute SVGMissingGlyphElementConstructor SVGMissingGlyphElement;
741        attribute SVGVKernElementConstructor SVGVKernElement;
742#endif
743
744#if defined(ENABLE_SVG_FOREIGN_OBJECT) && ENABLE_SVG_FOREIGN_OBJECT
745        attribute SVGForeignObjectElementConstructor SVGForeignObjectElement;
746#endif
747
748#if defined(ENABLE_FILTERS) && ENABLE_FILTERS
749        attribute SVGComponentTransferFunctionElementConstructor SVGComponentTransferFunctionElement;
750        attribute SVGFEBlendElementConstructor SVGFEBlendElement;
751        attribute SVGFEColorMatrixElementConstructor SVGFEColorMatrixElement;
752        attribute SVGFEComponentTransferElementConstructor SVGFEComponentTransferElement;
753        attribute SVGFECompositeElementConstructor SVGFECompositeElement;
754        attribute SVGFEConvolveMatrixElementConstructor SVGFEConvolveMatrixElement;
755        attribute SVGFEDiffuseLightingElementConstructor SVGFEDiffuseLightingElement;
756        attribute SVGFEDisplacementMapElementConstructor SVGFEDisplacementMapElement;
757        attribute SVGFEDistantLightElementConstructor SVGFEDistantLightElement;
758        attribute SVGFEFloodElementConstructor SVGFEFloodElement;
759        attribute SVGFEFuncAElementConstructor SVGFEFuncAElement;
760        attribute SVGFEFuncBElementConstructor SVGFEFuncBElement;
761        attribute SVGFEFuncGElementConstructor SVGFEFuncGElement;
762        attribute SVGFEFuncRElementConstructor SVGFEFuncRElement;
763        attribute SVGFEGaussianBlurElementConstructor SVGFEGaussianBlurElement;
764        attribute SVGFEImageElementConstructor SVGFEImageElement;
765        attribute SVGFEMergeElementConstructor SVGFEMergeElement;
766        attribute SVGFEMergeNodeElementConstructor SVGFEMergeNodeElement;
767        attribute SVGFEMorphologyElementConstructor SVGFEMorphologyElement;
768        attribute SVGFEOffsetElementConstructor SVGFEOffsetElement;
769        attribute SVGFEPointLightElementConstructor SVGFEPointLightElement;
770        attribute SVGFESpecularLightingElementConstructor SVGFESpecularLightingElement;
771        attribute SVGFESpotLightElementConstructor SVGFESpotLightElement;
772        attribute SVGFETileElementConstructor SVGFETileElement;
773        attribute SVGFETurbulenceElementConstructor SVGFETurbulenceElement;
774        attribute SVGFilterElementConstructor SVGFilterElement;
775#endif
776#endif
777
778        attribute [Conditional=DATABASE] SQLExceptionConstructor SQLException;
779
780        attribute [Conditional=TOUCH_EVENTS] TouchEventConstructor TouchEvent;
781
782        attribute DOMFormDataConstructor FormData;
783
784        attribute [Conditional=BLOB|FILE_SYSTEM] FileErrorConstructor FileError;
785        attribute [Conditional=BLOB] FileReaderConstructor FileReader;
786
787        attribute [Conditional=BLOB] WebKitBlobBuilderConstructor WebKitBlobBuilder;
788
789        readonly attribute [Conditional=BLOB] DOMURL webkitURL;
790
791#if defined(ENABLE_QUOTA) && ENABLE_QUOTA
792        readonly attribute [EnabledAtRuntime=Quota] StorageInfo webkitStorageInfo;
793#endif
794
795#endif // defined(LANGUAGE_JAVASCRIPT)
796
797#if defined(V8_BINDING) && V8_BINDING
798        // window.toString() requires special handling in V8
799        [V8DoNotCheckSignature, DoNotCheckDomainSecurity, Custom, DontEnum] DOMString toString();
800#endif // defined(V8_BINDING)
801    };
802
803}
804
805