Backed out changeset 8fc3326bce7f (bug 1943032) for causing failures at browser_tab_g...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / deqp / temp_externs / html5.js
blob4e8fbd0ec77ba3cabdadfc9cc5b3ba97995ddb15
1 /*
2 * Copyright 2008 The Closure Compiler Authors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 /**
17 * @fileoverview Definitions for all the extensions over the
18 * W3C's DOM3 specification in HTML5. This file depends on
19 * w3c_dom3.js. The whole file has been fully type annotated.
21 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/index.html
22 * @see http://dev.w3.org/html5/spec/Overview.html
24 * This also includes Typed Array definitions from
25 * http://www.khronos.org/registry/typedarray/specs/latest/
27 * This relies on w3c_event.js being included first.
29 * @externs
33 /**
34 * Note: In IE, the contains() method only exists on Elements, not Nodes.
35 * Therefore, it is recommended that you use the Conformance framework to
36 * prevent calling this on Nodes which are not Elements.
37 * @see https://connect.microsoft.com/IE/feedback/details/780874/node-contains-is-incorrect
39 * @param {Node} n The node to check
40 * @return {boolean} If 'n' is this Node, or is contained within this Node.
41 * @see https://developer.mozilla.org/en-US/docs/Web/API/Node.contains
42 * @nosideeffects
44 Node.prototype.contains = function(n) {};
47 /**
48 * @constructor
49 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#the-canvas-element
50 * @extends {HTMLElement}
52 function HTMLCanvasElement() {}
54 /** @type {number} */
55 HTMLCanvasElement.prototype.width;
57 /** @type {number} */
58 HTMLCanvasElement.prototype.height;
60 /**
61 * @param {string=} opt_type
62 * @param {...*} var_args
63 * @return {string}
64 * @throws {Error}
65 * @nosideeffects
67 HTMLCanvasElement.prototype.toDataURL = function(opt_type, var_args) {};
69 /**
70 * @param {string} contextId
71 * @param {Object=} opt_args
72 * @return {Object}
74 HTMLCanvasElement.prototype.getContext = function(contextId, opt_args) {};
76 /**
77 * @constructor
78 * @see http://www.w3.org/TR/2dcontext/#canvasrenderingcontext2d
80 function CanvasRenderingContext2D() {}
82 /** @type {HTMLCanvasElement} */
83 CanvasRenderingContext2D.prototype.canvas;
85 /**
86 * @return {undefined}
88 CanvasRenderingContext2D.prototype.save = function() {};
90 /**
91 * @return {undefined}
93 CanvasRenderingContext2D.prototype.restore = function() {};
95 /**
96 * @param {number} x
97 * @param {number} y
98 * @return {undefined}
100 CanvasRenderingContext2D.prototype.scale = function(x, y) {};
103 * @param {number} angle
104 * @return {undefined}
106 CanvasRenderingContext2D.prototype.rotate = function(angle) {};
109 * @param {number} x
110 * @param {number} y
111 * @return {undefined}
113 CanvasRenderingContext2D.prototype.translate = function(x, y) {};
116 * @param {number} m11
117 * @param {number} m12
118 * @param {number} m21
119 * @param {number} m22
120 * @param {number} dx
121 * @param {number} dy
122 * @return {undefined}
124 CanvasRenderingContext2D.prototype.transform = function(
125 m11, m12, m21, m22, dx, dy) {};
128 * @param {number} m11
129 * @param {number} m12
130 * @param {number} m21
131 * @param {number} m22
132 * @param {number} dx
133 * @param {number} dy
134 * @return {undefined}
136 CanvasRenderingContext2D.prototype.setTransform = function(
137 m11, m12, m21, m22, dx, dy) {};
140 * @param {number} x0
141 * @param {number} y0
142 * @param {number} x1
143 * @param {number} y1
144 * @return {CanvasGradient}
145 * @throws {Error}
146 * @nosideeffects
148 CanvasRenderingContext2D.prototype.createLinearGradient = function(
149 x0, y0, x1, y1) {};
152 * @param {number} x0
153 * @param {number} y0
154 * @param {number} r0
155 * @param {number} x1
156 * @param {number} y1
157 * @param {number} r1
158 * @return {CanvasGradient}
159 * @throws {Error}
160 * @nosideeffects
162 CanvasRenderingContext2D.prototype.createRadialGradient = function(
163 x0, y0, r0, x1, y1, r1) {};
166 * @param {HTMLImageElement|HTMLCanvasElement} image
167 * @param {string} repetition
168 * @return {CanvasPattern}
169 * @throws {Error}
170 * @nosideeffects
172 CanvasRenderingContext2D.prototype.createPattern = function(
173 image, repetition) {};
176 * @param {number} x
177 * @param {number} y
178 * @param {number} w
179 * @param {number} h
180 * @return {undefined}
182 CanvasRenderingContext2D.prototype.clearRect = function(x, y, w, h) {};
185 * @param {number} x
186 * @param {number} y
187 * @param {number} w
188 * @param {number} h
189 * @return {undefined}
191 CanvasRenderingContext2D.prototype.fillRect = function(x, y, w, h) {};
194 * @param {number} x
195 * @param {number} y
196 * @param {number} w
197 * @param {number} h
198 * @return {undefined}
200 CanvasRenderingContext2D.prototype.strokeRect = function(x, y, w, h) {};
203 * @return {undefined}
205 CanvasRenderingContext2D.prototype.beginPath = function() {};
208 * @return {undefined}
210 CanvasRenderingContext2D.prototype.closePath = function() {};
213 * @param {number} x
214 * @param {number} y
215 * @return {undefined}
217 CanvasRenderingContext2D.prototype.moveTo = function(x, y) {};
220 * @param {number} x
221 * @param {number} y
222 * @return {undefined}
224 CanvasRenderingContext2D.prototype.lineTo = function(x, y) {};
227 * @param {number} cpx
228 * @param {number} cpy
229 * @param {number} x
230 * @param {number} y
231 * @return {undefined}
233 CanvasRenderingContext2D.prototype.quadraticCurveTo = function(
234 cpx, cpy, x, y) {};
237 * @param {number} cp1x
238 * @param {number} cp1y
239 * @param {number} cp2x
240 * @param {number} cp2y
241 * @param {number} x
242 * @param {number} y
243 * @return {undefined}
245 CanvasRenderingContext2D.prototype.bezierCurveTo = function(
246 cp1x, cp1y, cp2x, cp2y, x, y) {};
249 * @param {number} x1
250 * @param {number} y1
251 * @param {number} x2
252 * @param {number} y2
253 * @param {number} radius
254 * @return {undefined}
256 CanvasRenderingContext2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {};
259 * @param {number} x
260 * @param {number} y
261 * @param {number} w
262 * @param {number} h
263 * @return {undefined}
265 CanvasRenderingContext2D.prototype.rect = function(x, y, w, h) {};
268 * @param {number} x
269 * @param {number} y
270 * @param {number} radius
271 * @param {number} startAngle
272 * @param {number} endAngle
273 * @param {boolean=} opt_anticlockwise
274 * @return {undefined}
276 CanvasRenderingContext2D.prototype.arc = function(
277 x, y, radius, startAngle, endAngle, opt_anticlockwise) {};
280 * @return {undefined}
282 CanvasRenderingContext2D.prototype.fill = function() {};
285 * @return {undefined}
287 CanvasRenderingContext2D.prototype.stroke = function() {};
290 * @return {undefined}
292 CanvasRenderingContext2D.prototype.clip = function() {};
295 * @param {number} x
296 * @param {number} y
297 * @return {boolean}
298 * @nosideeffects
300 CanvasRenderingContext2D.prototype.isPointInPath = function(x, y) {};
303 * @param {string} text
304 * @param {number} x
305 * @param {number} y
306 * @param {number=} opt_maxWidth
307 * @return {undefined}
309 CanvasRenderingContext2D.prototype.fillText = function(
310 text, x, y, opt_maxWidth) {};
313 * @param {string} text
314 * @param {number} x
315 * @param {number} y
316 * @param {number=} opt_maxWidth
317 * @return {undefined}
319 CanvasRenderingContext2D.prototype.strokeText = function(
320 text, x, y, opt_maxWidth) {};
323 * @param {string} text
324 * @return {TextMetrics}
325 * @nosideeffects
327 CanvasRenderingContext2D.prototype.measureText = function(text) {};
330 * @param {HTMLImageElement|HTMLCanvasElement|Image|HTMLVideoElement} image
331 * @param {number} dx Destination x coordinate.
332 * @param {number} dy Destination y coordinate.
333 * @param {number=} opt_dw Destination box width. Defaults to the image width.
334 * @param {number=} opt_dh Destination box height.
335 * Defaults to the image height.
336 * @param {number=} opt_sx Source box x coordinate. Used to select a portion of
337 * the source image to draw. Defaults to 0.
338 * @param {number=} opt_sy Source box y coordinate. Used to select a portion of
339 * the source image to draw. Defaults to 0.
340 * @param {number=} opt_sw Source box width. Used to select a portion of
341 * the source image to draw. Defaults to the full image width.
342 * @param {number=} opt_sh Source box height. Used to select a portion of
343 * the source image to draw. Defaults to the full image height.
344 * @return {undefined}
346 CanvasRenderingContext2D.prototype.drawImage = function(
347 image, dx, dy, opt_dw, opt_dh, opt_sx, opt_sy, opt_sw, opt_sh) {};
350 * @param {number} sw
351 * @param {number} sh
352 * @return {ImageData}
353 * @nosideeffects
355 CanvasRenderingContext2D.prototype.createImageData = function(sw, sh) {};
358 * @param {number} sx
359 * @param {number} sy
360 * @param {number} sw
361 * @param {number} sh
362 * @return {ImageData}
363 * @throws {Error}
364 * @nosideeffects
366 CanvasRenderingContext2D.prototype.getImageData = function(sx, sy, sw, sh) {};
369 * @param {ImageData} imagedata
370 * @param {number} dx
371 * @param {number} dy
372 * @param {number=} opt_dirtyX
373 * @param {number=} opt_dirtyY
374 * @param {number=} opt_dirtyWidth
375 * @param {number=} opt_dirtyHeight
376 * @return {undefined}
378 CanvasRenderingContext2D.prototype.putImageData = function(imagedata, dx, dy,
379 opt_dirtyX, opt_dirtyY, opt_dirtyWidth, opt_dirtyHeight) {};
382 * Note: WebKit only
383 * @param {number|string=} opt_a
384 * @param {number=} opt_b
385 * @param {number=} opt_c
386 * @param {number=} opt_d
387 * @param {number=} opt_e
388 * @see http://developer.apple.com/library/safari/#documentation/appleapplications/reference/WebKitDOMRef/CanvasRenderingContext2D_idl/Classes/CanvasRenderingContext2D/index.html
389 * @return {undefined}
391 CanvasRenderingContext2D.prototype.setFillColor;
394 * Note: WebKit only
395 * @param {number|string=} opt_a
396 * @param {number=} opt_b
397 * @param {number=} opt_c
398 * @param {number=} opt_d
399 * @param {number=} opt_e
400 * @see http://developer.apple.com/library/safari/#documentation/appleapplications/reference/WebKitDOMRef/CanvasRenderingContext2D_idl/Classes/CanvasRenderingContext2D/index.html
401 * @return {undefined}
403 CanvasRenderingContext2D.prototype.setStrokeColor;
406 * @return {Array.<number>}
408 CanvasRenderingContext2D.prototype.getLineDash;
411 * @param {Array.<number>} segments
412 * @return {undefined}
414 CanvasRenderingContext2D.prototype.setLineDash;
416 /** @type {string} */
417 CanvasRenderingContext2D.prototype.fillColor;
420 * @type {string}
421 * @implicitCast
423 CanvasRenderingContext2D.prototype.fillStyle;
425 /** @type {string} */
426 CanvasRenderingContext2D.prototype.font;
428 /** @type {number} */
429 CanvasRenderingContext2D.prototype.globalAlpha;
431 /** @type {string} */
432 CanvasRenderingContext2D.prototype.globalCompositeOperation;
434 /** @type {number} */
435 CanvasRenderingContext2D.prototype.lineWidth;
437 /** @type {string} */
438 CanvasRenderingContext2D.prototype.lineCap;
440 /** @type {string} */
441 CanvasRenderingContext2D.prototype.lineJoin;
443 /** @type {number} */
444 CanvasRenderingContext2D.prototype.miterLimit;
446 /** @type {number} */
447 CanvasRenderingContext2D.prototype.shadowBlur;
449 /** @type {string} */
450 CanvasRenderingContext2D.prototype.shadowColor;
452 /** @type {number} */
453 CanvasRenderingContext2D.prototype.shadowOffsetX;
455 /** @type {number} */
456 CanvasRenderingContext2D.prototype.shadowOffsetY;
459 * @type {string}
460 * @implicitCast
462 CanvasRenderingContext2D.prototype.strokeStyle;
464 /** @type {string} */
465 CanvasRenderingContext2D.prototype.strokeColor;
467 /** @type {string} */
468 CanvasRenderingContext2D.prototype.textAlign;
470 /** @type {string} */
471 CanvasRenderingContext2D.prototype.textBaseline;
474 * @constructor
476 function CanvasGradient() {}
479 * @param {number} offset
480 * @param {string} color
481 * @return {undefined}
483 CanvasGradient.prototype.addColorStop = function(offset, color) {};
486 * @constructor
488 function CanvasPattern() {}
491 * @constructor
493 function TextMetrics() {}
495 /** @type {number} */
496 TextMetrics.prototype.width;
499 * @constructor
501 function ImageData() {}
503 /** @type {Uint8ClampedArray} */
504 ImageData.prototype.data;
506 /** @type {number} */
507 ImageData.prototype.width;
509 /** @type {number} */
510 ImageData.prototype.height;
513 * @constructor
515 function ClientInformation() {}
517 /** @type {boolean} */
518 ClientInformation.prototype.onLine;
521 * @param {string} protocol
522 * @param {string} uri
523 * @param {string} title
524 * @return {undefined}
526 ClientInformation.prototype.registerProtocolHandler = function(
527 protocol, uri, title) {};
530 * @param {string} mimeType
531 * @param {string} uri
532 * @param {string} title
533 * @return {undefined}
535 ClientInformation.prototype.registerContentHandler = function(
536 mimeType, uri, title) {};
538 // HTML5 Database objects
540 * @constructor
542 function Database() {}
545 * @type {string}
547 Database.prototype.version;
550 * @param {function(!SQLTransaction) : void} callback
551 * @param {(function(!SQLError) : void)=} opt_errorCallback
552 * @param {Function=} opt_Callback
554 Database.prototype.transaction = function(
555 callback, opt_errorCallback, opt_Callback) {};
558 * @param {function(!SQLTransaction) : void} callback
559 * @param {(function(!SQLError) : void)=} opt_errorCallback
560 * @param {Function=} opt_Callback
562 Database.prototype.readTransaction = function(
563 callback, opt_errorCallback, opt_Callback) {};
566 * @param {string} oldVersion
567 * @param {string} newVersion
568 * @param {function(!SQLTransaction) : void} callback
569 * @param {function(!SQLError) : void} errorCallback
570 * @param {Function} successCallback
572 Database.prototype.changeVersion = function(
573 oldVersion, newVersion, callback, errorCallback, successCallback) {};
576 * @interface
578 function DatabaseCallback() {}
581 * @param {!Database} db
582 * @return {undefined}
584 DatabaseCallback.prototype.handleEvent = function(db) {};
587 * @constructor
589 function SQLError() {}
592 * @type {number}
594 SQLError.prototype.code;
597 * @type {string}
599 SQLError.prototype.message;
602 * @constructor
604 function SQLTransaction() {}
607 * @param {string} sqlStatement
608 * @param {Array.<*>=} opt_queryArgs
609 * @param {SQLStatementCallback=} opt_callback
610 * @param {(function(!SQLTransaction, !SQLError) : (boolean|void))=}
611 * opt_errorCallback
613 SQLTransaction.prototype.executeSql = function(
614 sqlStatement, opt_queryArgs, opt_callback, opt_errorCallback) {};
617 * @typedef {(function(!SQLTransaction, !SQLResultSet) : void)}
619 var SQLStatementCallback;
622 * @constructor
624 function SQLResultSet() {}
627 * @type {number}
629 SQLResultSet.prototype.insertId;
632 * @type {number}
634 SQLResultSet.prototype.rowsAffected;
637 * @type {SQLResultSetRowList}
639 SQLResultSet.prototype.rows;
642 * @constructor
644 function SQLResultSetRowList() {}
647 * @type {number}
649 SQLResultSetRowList.prototype.length;
652 * @param {number} index
653 * @return {Object}
654 * @nosideeffects
656 SQLResultSetRowList.prototype.item = function(index) {};
659 * @param {string} name
660 * @param {string} version
661 * @param {string} description
662 * @param {number} size
663 * @param {(DatabaseCallback|function(Database))=} opt_callback
664 * @return {Database}
666 function openDatabase(name, version, description, size, opt_callback) {}
669 * @param {string} name
670 * @param {string} version
671 * @param {string} description
672 * @param {number} size
673 * @param {(DatabaseCallback|function(Database))=} opt_callback
674 * @return {Database}
676 Window.prototype.openDatabase =
677 function(name, version, description, size, opt_callback) {};
680 * @type {boolean}
682 HTMLImageElement.prototype.complete;
685 * @type {string}
686 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#attr-img-crossorigin
688 HTMLImageElement.prototype.crossOrigin;
691 * This is a superposition of the Window and Worker postMessage methods.
692 * @param {*} message
693 * @param {(string|!Array.<!Transferable>)=} opt_targetOriginOrTransfer
694 * @param {(string|!Array.<!MessagePort>|!Array.<!Transferable>)=}
695 * opt_targetOriginOrPortsOrTransfer
696 * @return {void}
698 function postMessage(message, opt_targetOriginOrTransfer,
699 opt_targetOriginOrPortsOrTransfer) {}
702 * The postMessage method (as implemented in Opera).
703 * @param {string} message
705 Document.prototype.postMessage = function(message) {};
708 * Document head accessor.
709 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#the-head-element-0
710 * @type {HTMLHeadElement}
712 Document.prototype.head;
715 * @see https://developer.apple.com/webapps/docs/documentation/AppleApplications/Reference/SafariJSRef/DOMApplicationCache/DOMApplicationCache.html
716 * @constructor
717 * @implements {EventTarget}
719 function DOMApplicationCache() {}
722 * @param {boolean=} opt_useCapture
723 * @override
725 DOMApplicationCache.prototype.addEventListener = function(
726 type, listener, opt_useCapture) {};
729 * @param {boolean=} opt_useCapture
730 * @override
732 DOMApplicationCache.prototype.removeEventListener = function(
733 type, listener, opt_useCapture) {};
735 /** @override */
736 DOMApplicationCache.prototype.dispatchEvent = function(evt) {};
739 * The object isn't associated with an application cache. This can occur if the
740 * update process fails and there is no previous cache to revert to, or if there
741 * is no manifest file.
742 * @type {number}
744 DOMApplicationCache.prototype.UNCACHED = 0;
747 * The cache is idle.
748 * @type {number}
750 DOMApplicationCache.prototype.IDLE = 1;
753 * The update has started but the resources are not downloaded yet - for
754 * example, this can happen when the manifest file is fetched.
755 * @type {number}
757 DOMApplicationCache.prototype.CHECKING = 2;
760 * The resources are being downloaded into the cache.
761 * @type {number}
763 DOMApplicationCache.prototype.DOWNLOADING = 3;
766 * Resources have finished downloading and the new cache is ready to be used.
767 * @type {number}
769 DOMApplicationCache.prototype.UPDATEREADY = 4;
772 * The cache is obsolete.
773 * @type {number}
775 DOMApplicationCache.prototype.OBSOLETE = 5;
778 * The current status of the application cache.
779 * @type {number}
781 DOMApplicationCache.prototype.status;
784 * Sent when the update process finishes for the first time; that is, the first
785 * time an application cache is saved.
786 * @type {?function(!Event)}
788 DOMApplicationCache.prototype.oncached;
791 * Sent when the cache update process begins.
792 * @type {?function(!Event)}
794 DOMApplicationCache.prototype.onchecking;
797 * Sent when the update process begins downloading resources in the manifest
798 * file.
799 * @type {?function(!Event)}
801 DOMApplicationCache.prototype.ondownloading;
804 * Sent when an error occurs.
805 * @type {?function(!Event)}
807 DOMApplicationCache.prototype.onerror;
810 * Sent when the update process finishes but the manifest file does not change.
811 * @type {?function(!Event)}
813 DOMApplicationCache.prototype.onnoupdate;
816 * Sent when each resource in the manifest file begins to download.
817 * @type {?function(!Event)}
819 DOMApplicationCache.prototype.onprogress;
822 * Sent when there is an existing application cache, the update process
823 * finishes, and there is a new application cache ready for use.
824 * @type {?function(!Event)}
826 DOMApplicationCache.prototype.onupdateready;
829 * Replaces the active cache with the latest version.
830 * @throws {DOMException}
832 DOMApplicationCache.prototype.swapCache = function() {};
835 * Manually triggers the update process.
836 * @throws {DOMException}
838 DOMApplicationCache.prototype.update = function() {};
840 /** @type {DOMApplicationCache} */
841 var applicationCache;
843 /** @type {DOMApplicationCache} */
844 Window.prototype.applicationCache;
847 * @see https://developer.mozilla.org/En/DOM/Worker/Functions_available_to_workers
848 * @param {...string} var_args
850 Window.prototype.importScripts = function(var_args) {};
853 * @see https://developer.mozilla.org/En/DOM/Worker/Functions_available_to_workers
854 * @param {...string} var_args
856 var importScripts = function(var_args) {};
859 * @see http://dev.w3.org/html5/workers/
860 * @constructor
861 * @implements {EventTarget}
863 function WebWorker() {}
866 * @param {boolean=} opt_useCapture
867 * @override
869 WebWorker.prototype.addEventListener = function(
870 type, listener, opt_useCapture) {};
873 * @param {boolean=} opt_useCapture
874 * @override
876 WebWorker.prototype.removeEventListener = function(
877 type, listener, opt_useCapture) {};
879 /** @override */
880 WebWorker.prototype.dispatchEvent = function(evt) {};
883 * Stops the worker process
885 WebWorker.prototype.terminate = function() {};
888 * Posts a message to the worker thread.
889 * @param {string} message
891 WebWorker.prototype.postMessage = function(message) {};
894 * Sent when the worker thread posts a message to its creator.
895 * @type {?function(!MessageEvent.<*>)}
897 WebWorker.prototype.onmessage;
900 * Sent when the worker thread encounters an error.
901 * TODO(tbreisacher): Should this change to function(!ErrorEvent)?
902 * @type {?function(!Event)}
904 WebWorker.prototype.onerror;
907 * @see http://dev.w3.org/html5/workers/
908 * @constructor
909 * @implements {EventTarget}
911 function Worker(opt_arg0) {}
914 * @param {boolean=} opt_useCapture
915 * @override
917 Worker.prototype.addEventListener = function(
918 type, listener, opt_useCapture) {};
921 * @param {boolean=} opt_useCapture
922 * @override
924 Worker.prototype.removeEventListener = function(
925 type, listener, opt_useCapture) {};
927 /** @override */
928 Worker.prototype.dispatchEvent = function(evt) {};
931 * Stops the worker process
933 Worker.prototype.terminate = function() {};
936 * Posts a message to the worker thread.
937 * @param {*} message
938 * @param {Array.<!Transferable>=} opt_transfer
940 Worker.prototype.postMessage = function(message, opt_transfer) {};
943 * Posts a message to the worker thread.
944 * @param {*} message
945 * @param {Array.<!Transferable>=} opt_transfer
947 Worker.prototype.webkitPostMessage = function(message, opt_transfer) {};
950 * Sent when the worker thread posts a message to its creator.
951 * @type {?function(!MessageEvent.<*>)}
953 Worker.prototype.onmessage;
956 * Sent when the worker thread encounters an error.
957 * TODO(tbreisacher): Should this change to function(!ErrorEvent)?
958 * @type {?function(!Event)}
960 Worker.prototype.onerror;
963 * @see http://dev.w3.org/html5/workers/
964 * @param {string} scriptURL The URL of the script to run in the SharedWorker.
965 * @param {string=} opt_name A name that can later be used to obtain a
966 * reference to the same SharedWorker.
967 * @constructor
968 * @implements {EventTarget}
970 function SharedWorker(scriptURL, opt_name) {}
973 * @param {boolean=} opt_useCapture
974 * @override
976 SharedWorker.prototype.addEventListener = function(
977 type, listener, opt_useCapture) {};
980 * @param {boolean=} opt_useCapture
981 * @override
983 SharedWorker.prototype.removeEventListener = function(
984 type, listener, opt_useCapture) {};
986 /** @override */
987 SharedWorker.prototype.dispatchEvent = function(evt) {};
990 * @type {!MessagePort}
992 SharedWorker.prototype.port;
995 * Called on network errors for loading the initial script.
996 * TODO(tbreisacher): Should this change to function(!ErrorEvent)?
997 * @type {?function(!Event)}
999 SharedWorker.prototype.onerror;
1002 * @see http://dev.w3.org/html5/workers/
1003 * @interface
1005 function WorkerLocation() {}
1007 /** @type {string} */
1008 WorkerLocation.prototype.protocol;
1010 /** @type {string} */
1011 WorkerLocation.prototype.host;
1013 /** @type {string} */
1014 WorkerLocation.prototype.hostname;
1016 /** @type {string} */
1017 WorkerLocation.prototype.port;
1019 /** @type {string} */
1020 WorkerLocation.prototype.pathname;
1022 /** @type {string} */
1023 WorkerLocation.prototype.search;
1025 /** @type {string} */
1026 WorkerLocation.prototype.hash;
1029 * @see http://dev.w3.org/html5/workers/
1030 * @interface
1031 * @extends {EventTarget}
1033 function WorkerGlobalScope() {}
1035 /** @type {WorkerGlobalScope} */
1036 WorkerGlobalScope.prototype.self;
1038 /** @type {WorkerLocation} */
1039 WorkerGlobalScope.prototype.location;
1042 * Closes the worker represented by this WorkerGlobalScope.
1044 WorkerGlobalScope.prototype.close = function() {};
1047 * Sent when the worker encounters an error.
1048 * @type {?function(!Event)}
1050 WorkerGlobalScope.prototype.onerror;
1053 * Sent when the worker goes offline.
1054 * @type {?function(!Event)}
1056 WorkerGlobalScope.prototype.onoffline;
1059 * Sent when the worker goes online.
1060 * @type {?function(!Event)}
1062 WorkerGlobalScope.prototype.ononline;
1065 * @see http://dev.w3.org/html5/workers/
1066 * @interface
1067 * @extends {WorkerGlobalScope}
1069 function DedicatedWorkerGlobalScope() {}
1072 * Posts a message to creator of this worker.
1073 * @param {*} message
1074 * @param {Array.<!Transferable>=} opt_transfer
1076 DedicatedWorkerGlobalScope.prototype.postMessage =
1077 function(message, opt_transfer) {};
1080 * Posts a message to creator of this worker.
1081 * @param {*} message
1082 * @param {Array.<!Transferable>=} opt_transfer
1084 DedicatedWorkerGlobalScope.prototype.webkitPostMessage =
1085 function(message, opt_transfer) {};
1088 * Sent when the creator posts a message to this worker.
1089 * @type {?function(!MessageEvent.<*>)}
1091 DedicatedWorkerGlobalScope.prototype.onmessage;
1094 * @see http://dev.w3.org/html5/workers/
1095 * @interface
1096 * @extends {WorkerGlobalScope}
1098 function SharedWorkerGlobalScope() {}
1100 /** @type {string} */
1101 SharedWorkerGlobalScope.prototype.name;
1104 * Sent when a connection to this worker is opened.
1105 * @type {?function(!Event)}
1107 SharedWorkerGlobalScope.prototype.onconnect;
1109 /** @type {Element} */
1110 HTMLElement.prototype.contextMenu;
1112 /** @type {boolean} */
1113 HTMLElement.prototype.draggable;
1116 * This is actually a DOMSettableTokenList property. However since that
1117 * interface isn't currently defined and no known browsers implement this
1118 * feature, just define the property for now.
1120 * @const
1121 * @type {Object}
1123 HTMLElement.prototype.dropzone;
1126 * @see http://www.w3.org/TR/html5/dom.html#dom-getelementsbyclassname
1127 * @param {string} classNames
1128 * @return {!NodeList}
1129 * @nosideeffects
1131 HTMLElement.prototype.getElementsByClassName = function(classNames) {};
1132 // NOTE: Document.prototype.getElementsByClassName is in gecko_dom.js
1134 /** @type {boolean} */
1135 HTMLElement.prototype.hidden;
1137 /** @type {boolean} */
1138 HTMLElement.prototype.spellcheck;
1141 * @see http://www.w3.org/TR/components-intro/
1142 * @return {!ShadowRoot}
1144 HTMLElement.prototype.createShadowRoot;
1147 * @see http://www.w3.org/TR/components-intro/
1148 * @return {!ShadowRoot}
1150 HTMLElement.prototype.webkitCreateShadowRoot;
1153 * @see http://www.w3.org/TR/shadow-dom/
1154 * @type {ShadowRoot}
1156 HTMLElement.prototype.shadowRoot;
1159 * @see http://www.w3.org/TR/shadow-dom/
1160 * @return {!NodeList}
1162 HTMLElement.prototype.getDestinationInsertionPoints = function() {};
1165 * @see http://www.w3.org/TR/components-intro/
1166 * @type {function()}
1168 HTMLElement.prototype.createdCallback;
1171 * @see http://w3c.github.io/webcomponents/explainer/#lifecycle-callbacks
1172 * @type {function()}
1174 HTMLElement.prototype.attachedCallback;
1177 * @see http://w3c.github.io/webcomponents/explainer/#lifecycle-callbacks
1178 * @type {function()}
1180 HTMLElement.prototype.detachedCallback;
1182 /** @type {string} */
1183 HTMLAnchorElement.prototype.hash;
1185 /** @type {string} */
1186 HTMLAnchorElement.prototype.host;
1188 /** @type {string} */
1189 HTMLAnchorElement.prototype.hostname;
1191 /** @type {string} */
1192 HTMLAnchorElement.prototype.pathname;
1195 * The 'ping' attribute is known to be supported in recent versions (as of
1196 * mid-2014) of Chrome, Safari, and Firefox, and is not supported in any
1197 * current version of Internet Explorer.
1199 * @type {string}
1200 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#hyperlink-auditing
1202 HTMLAnchorElement.prototype.ping;
1204 /** @type {string} */
1205 HTMLAnchorElement.prototype.port;
1207 /** @type {string} */
1208 HTMLAnchorElement.prototype.protocol;
1210 /** @type {string} */
1211 HTMLAnchorElement.prototype.search;
1214 * @type {string}
1215 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#hyperlink-auditing
1217 HTMLAreaElement.prototype.ping;
1220 * @type {string}
1221 * @see http://www.w3.org/TR/html-markup/iframe.html#iframe.attrs.srcdoc
1223 HTMLIFrameElement.prototype.srcdoc;
1225 /** @type {string} */
1226 HTMLInputElement.prototype.autocomplete;
1228 /** @type {string} */
1229 HTMLInputElement.prototype.dirname;
1231 /** @type {FileList} */
1232 HTMLInputElement.prototype.files;
1234 /** @type {string} */
1235 HTMLInputElement.prototype.list;
1237 /** @type {string} */
1238 HTMLInputElement.prototype.max;
1240 /** @type {string} */
1241 HTMLInputElement.prototype.min;
1243 /** @type {string} */
1244 HTMLInputElement.prototype.pattern;
1246 /** @type {boolean} */
1247 HTMLInputElement.prototype.multiple;
1249 /** @type {string} */
1250 HTMLInputElement.prototype.placeholder;
1252 /** @type {boolean} */
1253 HTMLInputElement.prototype.required;
1255 /** @type {string} */
1256 HTMLInputElement.prototype.step;
1258 /** @type {Date} */
1259 HTMLInputElement.prototype.valueAsDate;
1261 /** @type {number} */
1262 HTMLInputElement.prototype.valueAsNumber;
1265 * Changes the form control's value by the value given in the step attribute
1266 * multiplied by opt_n.
1267 * @param {number=} opt_n step multiplier. Defaults to 1.
1269 HTMLInputElement.prototype.stepDown = function(opt_n) {};
1272 * Changes the form control's value by the value given in the step attribute
1273 * multiplied by opt_n.
1274 * @param {number=} opt_n step multiplier. Defaults to 1.
1276 HTMLInputElement.prototype.stepUp = function(opt_n) {};
1281 * @constructor
1282 * @extends {HTMLElement}
1283 * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement
1285 function HTMLMediaElement() {}
1288 * @type {number}
1289 * @const
1291 HTMLMediaElement.HAVE_NOTHING; // = 0
1294 * @type {number}
1295 * @const
1297 HTMLMediaElement.HAVE_METADATA; // = 1
1300 * @type {number}
1301 * @const
1303 HTMLMediaElement.HAVE_CURRENT_DATA; // = 2
1306 * @type {number}
1307 * @const
1309 HTMLMediaElement.HAVE_FUTURE_DATA; // = 3
1312 * @type {number}
1313 * @const
1315 HTMLMediaElement.HAVE_ENOUGH_DATA; // = 4
1317 /** @type {MediaError} */
1318 HTMLMediaElement.prototype.error;
1320 /** @type {string} */
1321 HTMLMediaElement.prototype.src;
1323 /** @type {string} */
1324 HTMLMediaElement.prototype.currentSrc;
1326 /** @type {number} */
1327 HTMLMediaElement.prototype.networkState;
1329 /** @type {boolean} */
1330 HTMLMediaElement.prototype.autobuffer;
1332 /** @type {TimeRanges} */
1333 HTMLMediaElement.prototype.buffered;
1336 * Loads the media element.
1338 HTMLMediaElement.prototype.load = function() {};
1341 * @param {string} type Type of the element in question in question.
1342 * @return {string} Whether it can play the type.
1343 * @nosideeffects
1345 HTMLMediaElement.prototype.canPlayType = function(type) {};
1348 * Callback when the media is buffered and ready to play through.
1349 * @type {function(!Event)}
1351 HTMLMediaElement.prototype.oncanplaythrough;
1353 /** @type {number} */
1354 HTMLMediaElement.prototype.readyState;
1356 /** @type {boolean} */
1357 HTMLMediaElement.prototype.seeking;
1360 * The current time, in seconds.
1361 * @type {number}
1363 HTMLMediaElement.prototype.currentTime;
1366 * The absolute timeline offset.
1367 * @return {!Date}
1369 HTMLMediaElement.prototype.getStartDate = function() {};
1372 * The length of the media in seconds.
1373 * @type {number}
1375 HTMLMediaElement.prototype.duration;
1377 /** @type {boolean} */
1378 HTMLMediaElement.prototype.paused;
1380 /** @type {number} */
1381 HTMLMediaElement.prototype.defaultPlaybackRate;
1383 /** @type {number} */
1384 HTMLMediaElement.prototype.playbackRate;
1386 /** @type {TimeRanges} */
1387 HTMLMediaElement.prototype.played;
1389 /** @type {TimeRanges} */
1390 HTMLMediaElement.prototype.seekable;
1392 /** @type {boolean} */
1393 HTMLMediaElement.prototype.ended;
1395 /** @type {boolean} */
1396 HTMLMediaElement.prototype.autoplay;
1398 /** @type {boolean} */
1399 HTMLMediaElement.prototype.loop;
1402 * Starts playing the media.
1404 HTMLMediaElement.prototype.play = function() {};
1407 * Pauses the media.
1409 HTMLMediaElement.prototype.pause = function() {};
1411 /** @type {boolean} */
1412 HTMLMediaElement.prototype.controls;
1415 * The audio volume, from 0.0 (silent) to 1.0 (loudest).
1416 * @type {number}
1418 HTMLMediaElement.prototype.volume;
1420 /** @type {boolean} */
1421 HTMLMediaElement.prototype.muted;
1424 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-media-addtexttrack
1425 * @param {string} kind Kind of the text track.
1426 * @param {string=} opt_label Label of the text track.
1427 * @param {string=} opt_language Language of the text track.
1428 * @return {TextTrack} TextTrack object added to the media element.
1430 HTMLMediaElement.prototype.addTextTrack =
1431 function(kind, opt_label, opt_language) {};
1433 /** @type {TextTrackList} */
1434 HTMLMediaElement.prototype.textTracks;
1438 * @see http://www.w3.org/TR/shadow-dom/
1439 * @return {!NodeList}
1441 Text.prototype.getDestinationInsertionPoints = function() {};
1445 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttracklist
1446 * @constructor
1448 function TextTrackList() {}
1450 /** @type {number} */
1451 TextTrackList.prototype.length;
1454 * @param {string} id
1455 * @return {TextTrack}
1457 TextTrackList.prototype.getTrackById = function(id) {};
1461 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttrack
1462 * @constructor
1463 * @implements {EventTarget}
1465 function TextTrack() {}
1468 * @param {TextTrackCue} cue
1470 TextTrack.prototype.addCue = function(cue) {};
1473 * @param {TextTrackCue} cue
1475 TextTrack.prototype.removeCue = function(cue) {};
1478 * @const {TextTrackCueList}
1480 TextTrack.prototype.activeCues;
1483 * @const {TextTrackCueList}
1485 TextTrack.prototype.cues;
1487 /** @override */
1488 TextTrack.prototype.addEventListener = function(type, listener, useCapture) {};
1490 /** @override */
1491 TextTrack.prototype.dispatchEvent = function(evt) {};
1493 /** @override */
1494 TextTrack.prototype.removeEventListener = function(type, listener, useCapture)
1500 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttrackcuelist
1501 * @constructor
1503 function TextTrackCueList() {}
1505 /** @const {number} */
1506 TextTrackCueList.prototype.length;
1509 * @param {string} id
1510 * @return {TextTrackCue}
1512 TextTrackCueList.prototype.getCueById = function(id) {};
1517 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttrackcue
1518 * @constructor
1519 * @param {number} startTime
1520 * @param {number} endTime
1521 * @param {string} text
1523 function TextTrackCue(startTime, endTime, text) {}
1525 /** @type {string} */
1526 TextTrackCue.prototype.id;
1528 /** @type {number} */
1529 TextTrackCue.prototype.startTime;
1531 /** @type {number} */
1532 TextTrackCue.prototype.endTime;
1534 /** @type {string} */
1535 TextTrackCue.prototype.text;
1539 * @see http://dev.w3.org/html5/webvtt/#the-vttcue-interface
1540 * @constructor
1541 * @extends {TextTrackCue}
1543 function VTTCue(startTime, endTime, text) {}
1547 * @constructor
1548 * @extends {HTMLMediaElement}
1550 function HTMLAudioElement() {}
1553 * @constructor
1554 * @extends {HTMLMediaElement}
1555 * The webkit-prefixed attributes are defined in
1556 * https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/html/HTMLVideoElement.idl
1558 function HTMLVideoElement() {}
1561 * Starts displaying the video in full screen mode.
1563 HTMLVideoElement.prototype.webkitEnterFullscreen = function() {};
1566 * Starts displaying the video in full screen mode.
1568 HTMLVideoElement.prototype.webkitEnterFullScreen = function() {};
1571 * Stops displaying the video in full screen mode.
1573 HTMLVideoElement.prototype.webkitExitFullscreen = function() {};
1576 * Stops displaying the video in full screen mode.
1578 HTMLVideoElement.prototype.webkitExitFullScreen = function() {};
1580 /** @type {string} */
1581 HTMLVideoElement.prototype.width;
1583 /** @type {string} */
1584 HTMLVideoElement.prototype.height;
1586 /** @type {number} */
1587 HTMLVideoElement.prototype.videoWidth;
1589 /** @type {number} */
1590 HTMLVideoElement.prototype.videoHeight;
1592 /** @type {string} */
1593 HTMLVideoElement.prototype.poster;
1595 /** @type {boolean} */
1596 HTMLVideoElement.prototype.webkitSupportsFullscreen;
1598 /** @type {boolean} */
1599 HTMLVideoElement.prototype.webkitDisplayingFullscreen;
1601 /** @type {number} */
1602 HTMLVideoElement.prototype.webkitDecodedFrameCount;
1604 /** @type {number} */
1605 HTMLVideoElement.prototype.webkitDroppedFrameCount;
1608 * @constructor
1610 function MediaError() {}
1612 /** @type {number} */
1613 MediaError.prototype.code;
1615 // HTML5 MessageChannel
1617 * @see http://dev.w3.org/html5/spec/comms.html#messagechannel
1618 * @constructor
1620 function MessageChannel() {}
1623 * Returns the first port.
1624 * @type {!MessagePort}
1626 MessageChannel.prototype.port1;
1629 * Returns the second port.
1630 * @type {!MessagePort}
1632 MessageChannel.prototype.port2;
1634 // HTML5 MessagePort
1636 * @see http://dev.w3.org/html5/spec/comms.html#messageport
1637 * @constructor
1638 * @implements {EventTarget}
1639 * @implements {Transferable}
1641 function MessagePort() {}
1644 * @param {boolean=} opt_useCapture
1645 * @override
1647 MessagePort.prototype.addEventListener = function(
1648 type, listener, opt_useCapture) {};
1651 * @param {boolean=} opt_useCapture
1652 * @override
1654 MessagePort.prototype.removeEventListener = function(
1655 type, listener, opt_useCapture) {};
1657 /** @override */
1658 MessagePort.prototype.dispatchEvent = function(evt) {};
1662 * Posts a message through the channel, optionally with the given
1663 * Array of Transferables.
1664 * @param {*} message
1665 * @param {Array.<!Transferable>=} opt_transfer
1667 MessagePort.prototype.postMessage = function(message, opt_transfer) {
1671 * Begins dispatching messages received on the port.
1673 MessagePort.prototype.start = function() {};
1676 * Disconnects the port, so that it is no longer active.
1678 MessagePort.prototype.close = function() {};
1681 * TODO(blickly): Change this to MessageEvent.<*> and add casts as needed
1682 * @type {?function(!MessageEvent.<?>)}
1684 MessagePort.prototype.onmessage;
1686 // HTML5 MessageEvent class
1688 * @see http://dev.w3.org/html5/spec/comms.html#messageevent
1689 * @constructor
1690 * @extends {Event}
1691 * @template T
1693 function MessageEvent() {}
1696 * The data payload of the message.
1697 * @type {T}
1699 MessageEvent.prototype.data;
1702 * The origin of the message, for server-sent events and cross-document
1703 * messaging.
1704 * @type {string}
1706 MessageEvent.prototype.origin;
1709 * The last event ID, for server-sent events.
1710 * @type {string}
1712 MessageEvent.prototype.lastEventId;
1715 * The window that dispatched the event.
1716 * @type {Window}
1718 MessageEvent.prototype.source;
1721 * The Array of MessagePorts sent with the message, for cross-document
1722 * messaging and channel messaging.
1723 * @type {Array.<MessagePort>}
1725 MessageEvent.prototype.ports;
1728 * Initializes the event in a manner analogous to the similarly-named methods in
1729 * the DOM Events interfaces.
1730 * @param {string} typeArg
1731 * @param {boolean} canBubbleArg
1732 * @param {boolean} cancelableArg
1733 * @param {T} dataArg
1734 * @param {string} originArg
1735 * @param {string} lastEventIdArg
1736 * @param {Window} sourceArg
1737 * @param {Array.<MessagePort>} portsArg
1739 MessageEvent.prototype.initMessageEvent = function(typeArg, canBubbleArg,
1740 cancelableArg, dataArg, originArg, lastEventIdArg, sourceArg, portsArg) {};
1743 * Initializes the event in a manner analogous to the similarly-named methods in
1744 * the DOM Events interfaces.
1745 * @param {string} namespaceURI
1746 * @param {string} typeArg
1747 * @param {boolean} canBubbleArg
1748 * @param {boolean} cancelableArg
1749 * @param {T} dataArg
1750 * @param {string} originArg
1751 * @param {string} lastEventIdArg
1752 * @param {Window} sourceArg
1753 * @param {Array.<MessagePort>} portsArg
1755 MessageEvent.prototype.initMessageEventNS = function(namespaceURI, typeArg,
1756 canBubbleArg, cancelableArg, dataArg, originArg, lastEventIdArg, sourceArg,
1757 portsArg) {};
1760 * HTML5 DataTransfer class.
1762 * We say that this extends ClipboardData, because Event.prototype.clipboardData
1763 * is a DataTransfer on WebKit but a ClipboardData on IE. The interfaces are so
1764 * similar that it's easier to merge them.
1766 * @see http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html
1767 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html
1768 * @see http://developers.whatwg.org/dnd.html#datatransferitem
1769 * @constructor
1770 * @extends {ClipboardData}
1772 function DataTransfer() {}
1774 /** @type {string} */
1775 DataTransfer.prototype.dropEffect;
1777 /** @type {string} */
1778 DataTransfer.prototype.effectAllowed;
1780 /** @type {Array.<string>} */
1781 DataTransfer.prototype.types;
1783 /** @type {FileList} */
1784 DataTransfer.prototype.files;
1787 * @param {string=} opt_format Format for which to remove data.
1788 * @override
1790 DataTransfer.prototype.clearData = function(opt_format) {};
1793 * @param {string} format Format for which to set data.
1794 * @param {string} data Data to add.
1795 * @override
1797 DataTransfer.prototype.setData = function(format, data) {};
1800 * @param {string} format Format for which to set data.
1801 * @return {string} Data for the given format.
1802 * @override
1804 DataTransfer.prototype.getData = function(format) { return ''; };
1807 * @param {HTMLElement} img The image to use when dragging.
1808 * @param {number} x Horizontal position of the cursor.
1809 * @param {number} y Vertical position of the cursor.
1811 DataTransfer.prototype.setDragImage = function(img, x, y) {};
1814 * @param {HTMLElement} elem Element to receive drag result events.
1816 DataTransfer.prototype.addElement = function(elem) {};
1819 * Addition for accessing clipboard file data that are part of the proposed
1820 * HTML5 spec.
1821 * @type {DataTransfer}
1823 MouseEvent.prototype.dataTransfer;
1826 * @typedef {{
1827 * bubbles: (boolean|undefined),
1828 * cancelable: (boolean|undefined),
1829 * view: (Window|undefined),
1830 * detail: (number|undefined),
1831 * screenX: (number|undefined),
1832 * screenY: (number|undefined),
1833 * clientX: (number|undefined),
1834 * clientY: (number|undefined),
1835 * ctrlKey: (boolean|undefined),
1836 * shiftKey: (boolean|undefined),
1837 * altKey: (boolean|undefined),
1838 * metaKey: (boolean|undefined),
1839 * button: (number|undefined),
1840 * buttons: (number|undefined),
1841 * relatedTarget: (EventTarget|undefined),
1842 * deltaX: (number|undefined),
1843 * deltaY: (number|undefined),
1844 * deltaZ: (number|undefined),
1845 * deltaMode: (number|undefined)
1846 * }}
1848 var WheelEventInit;
1851 * @param {string} type
1852 * @param {WheelEventInit=} opt_eventInitDict
1853 * @see http://www.w3.org/TR/DOM-Level-3-Events/#interface-WheelEvent
1854 * @constructor
1855 * @extends {MouseEvent}
1857 var WheelEvent = function(type, opt_eventInitDict) {};
1859 /** @const {number} */
1860 WheelEvent.prototype.deltaX;
1862 /** @const {number} */
1863 WheelEvent.prototype.deltaY;
1865 /** @const {number} */
1866 WheelEvent.prototype.deltaZ;
1868 /** @const {number} */
1869 WheelEvent.prototype.deltaMode;
1872 * HTML5 DataTransferItem class.
1874 * @see http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html
1875 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html
1876 * @see http://developers.whatwg.org/dnd.html#datatransferitem
1877 * @constructor
1879 var DataTransferItem = function() {};
1881 /** @type {string} */
1882 DataTransferItem.prototype.kind;
1884 /** @type {string} */
1885 DataTransferItem.prototype.type;
1888 * @param {function(string)} callback
1889 * @nosideeffects
1891 DataTransferItem.prototype.getAsString = function(callback) {};
1894 * @return {?File} The file corresponding to this item, or null.
1895 * @nosideeffects
1897 DataTransferItem.prototype.getAsFile = function() { return null; };
1900 * @return {?Entry} The Entry corresponding to this item, or null. Note that
1901 * despite its name,this method only works in Chrome, and will eventually
1902 * be renamed to {@code getAsEntry}.
1903 * @nosideeffects
1905 DataTransferItem.prototype.webkitGetAsEntry = function() { return null; };
1908 * HTML5 DataTransferItemList class. There are some discrepancies in the docs
1909 * on the whatwg.org site. When in doubt, these prototypes match what is
1910 * implemented as of Chrome 30.
1912 * @see http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html
1913 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html
1914 * @see http://developers.whatwg.org/dnd.html#datatransferitem
1915 * @constructor
1917 var DataTransferItemList = function() {};
1919 /** @type {number} */
1920 DataTransferItemList.prototype.length;
1923 * @param {number} i File to return from the list.
1924 * @return {DataTransferItem} The ith DataTransferItem in the list, or null.
1925 * @nosideeffects
1927 DataTransferItemList.prototype.item = function(i) { return null; };
1930 * Adds an item to the list.
1931 * @param {string|!File} data Data for the item being added.
1932 * @param {string=} opt_type Mime type of the item being added. MUST be present
1933 * if the {@code data} parameter is a string.
1935 DataTransferItemList.prototype.add = function(data, opt_type) {};
1938 * Removes an item from the list.
1939 * @param {number} i File to remove from the list.
1941 DataTransferItemList.prototype.remove = function(i) {};
1944 * Removes all items from the list.
1946 DataTransferItemList.prototype.clear = function() {};
1948 /** @type {!DataTransferItemList} */
1949 DataTransfer.prototype.items;
1953 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dragevent-interface
1954 * @constructor
1955 * @extends {MouseEvent}
1957 function DragEvent() {}
1959 /** @type {DataTransfer} */
1960 DragEvent.prototype.dataTransfer;
1964 * @typedef {{
1965 * lengthComputable: (boolean|undefined),
1966 * loaded: (number|undefined),
1967 * total: (number|undefined)
1968 * }}
1970 var ProgressEventInit;
1973 * @constructor
1974 * @param {string} type
1975 * @param {ProgressEventInit=} opt_progressEventInitDict
1976 * @extends {Event}
1977 * @see https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent
1979 function ProgressEvent(type, opt_progressEventInitDict) {}
1981 /** @type {number} */
1982 ProgressEvent.prototype.total;
1984 /** @type {number} */
1985 ProgressEvent.prototype.loaded;
1987 /** @type {boolean} */
1988 ProgressEvent.prototype.lengthComputable;
1992 * @constructor
1994 function TimeRanges() {}
1996 /** @type {number} */
1997 TimeRanges.prototype.length;
2000 * @param {number} index The index.
2001 * @return {number} The start time of the range at index.
2002 * @throws {DOMException}
2004 TimeRanges.prototype.start = function(index) { return 0; };
2007 * @param {number} index The index.
2008 * @return {number} The end time of the range at index.
2009 * @throws {DOMException}
2011 TimeRanges.prototype.end = function(index) { return 0; };
2014 // HTML5 Web Socket class
2016 * @see http://dev.w3.org/html5/websockets/
2017 * @constructor
2018 * @param {string} url
2019 * @param {string=} opt_protocol
2020 * @implements {EventTarget}
2022 function WebSocket(url, opt_protocol) {}
2025 * @param {boolean=} opt_useCapture
2026 * @override
2028 WebSocket.prototype.addEventListener = function(
2029 type, listener, opt_useCapture) {};
2032 * @param {boolean=} opt_useCapture
2033 * @override
2035 WebSocket.prototype.removeEventListener = function(
2036 type, listener, opt_useCapture) {};
2038 /** @override */
2039 WebSocket.prototype.dispatchEvent = function(evt) {};
2042 * Returns the URL value that was passed to the constructor.
2043 * @type {string}
2045 WebSocket.prototype.URL;
2048 * The connection has not yet been established.
2049 * @type {number}
2051 WebSocket.prototype.CONNECTING = 0;
2054 * The Web Socket connection is established and communication is possible.
2055 * @type {number}
2057 WebSocket.prototype.OPEN = 1;
2060 * The connection has been closed or could not be opened.
2061 * @type {number}
2063 WebSocket.prototype.CLOSED = 2;
2066 * Represents the state of the connection.
2067 * @type {number}
2069 WebSocket.prototype.readyState;
2072 * Returns the number of bytes that have been queued but not yet sent.
2073 * @type {number}
2075 WebSocket.prototype.bufferedAmount;
2078 * An event handler called on open event.
2079 * @type {?function(!Event)}
2081 WebSocket.prototype.onopen;
2084 * An event handler called on message event.
2085 * TODO(blickly): Change this to MessageEvent.<*> and add casts as needed
2086 * @type {?function(!MessageEvent.<?>)}
2088 WebSocket.prototype.onmessage;
2091 * An event handler called on close event.
2092 * @type {?function(!Event)}
2094 WebSocket.prototype.onclose;
2097 * Transmits data using the connection.
2098 * @param {string|ArrayBuffer|ArrayBufferView} data
2099 * @return {boolean}
2101 WebSocket.prototype.send = function(data) {};
2104 * Closes the Web Socket connection or connection attempt, if any.
2106 WebSocket.prototype.close = function() {};
2109 * @type {string} Sets the type of data (blob or arraybuffer) for binary data.
2111 WebSocket.prototype.binaryType;
2113 // HTML5 History
2115 * Pushes a new state into the session history.
2116 * @see http://www.w3.org/TR/html5/history.html#the-history-interface
2117 * @param {*} data New state.
2118 * @param {string} title The title for a new session history entry.
2119 * @param {string=} opt_url The URL for a new session history entry.
2121 History.prototype.pushState = function(data, title, opt_url) {};
2124 * Replaces the current state in the session history.
2125 * @see http://www.w3.org/TR/html5/history.html#the-history-interface
2126 * @param {*} data New state.
2127 * @param {string} title The title for a session history entry.
2128 * @param {string=} opt_url The URL for a new session history entry.
2130 History.prototype.replaceState = function(data, title, opt_url) {};
2133 * Pending state object.
2134 * @see https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history#Reading_the_current_state
2135 * @type {*}
2137 History.prototype.state;
2140 * @see http://www.whatwg.org/specs/web-apps/current-work/#popstateevent
2141 * @constructor
2142 * @extends {Event}
2144 * @param {string} type
2145 * @param {{state: *}=} opt_eventInitDict
2147 function PopStateEvent(type, opt_eventInitDict) {}
2150 * @type {*}
2152 PopStateEvent.prototype.state;
2155 * Initializes the event after it has been created with document.createEvent
2156 * @param {string} typeArg
2157 * @param {boolean} canBubbleArg
2158 * @param {boolean} cancelableArg
2159 * @param {*} stateArg
2161 PopStateEvent.prototype.initPopStateEvent = function(typeArg, canBubbleArg,
2162 cancelableArg, stateArg) {};
2165 * @see http://www.whatwg.org/specs/web-apps/current-work/#hashchangeevent
2166 * @constructor
2167 * @extends {Event}
2169 * @param {string} type
2170 * @param {{oldURL: string, newURL: string}=} opt_eventInitDict
2172 function HashChangeEvent(type, opt_eventInitDict) {}
2174 /** @type {string} */
2175 HashChangeEvent.prototype.oldURL;
2177 /** @type {string} */
2178 HashChangeEvent.prototype.newURL;
2181 * Initializes the event after it has been created with document.createEvent
2182 * @param {string} typeArg
2183 * @param {boolean} canBubbleArg
2184 * @param {boolean} cancelableArg
2185 * @param {string} oldURLArg
2186 * @param {string} newURLArg
2188 HashChangeEvent.prototype.initHashChangeEvent = function(typeArg, canBubbleArg,
2189 cancelableArg, oldURLArg, newURLArg) {};
2192 * @see http://www.whatwg.org/specs/web-apps/current-work/#pagetransitionevent
2193 * @constructor
2194 * @extends {Event}
2196 * @param {string} type
2197 * @param {{persisted: boolean}=} opt_eventInitDict
2199 function PageTransitionEvent(type, opt_eventInitDict) {}
2201 /** @type {boolean} */
2202 PageTransitionEvent.prototype.persisted;
2205 * Initializes the event after it has been created with document.createEvent
2206 * @param {string} typeArg
2207 * @param {boolean} canBubbleArg
2208 * @param {boolean} cancelableArg
2209 * @param {*} persistedArg
2211 PageTransitionEvent.prototype.initPageTransitionEvent = function(typeArg,
2212 canBubbleArg, cancelableArg, persistedArg) {};
2215 * @constructor
2217 function FileList() {}
2219 /** @type {number} */
2220 FileList.prototype.length;
2223 * @param {number} i File to return from the list.
2224 * @return {File} The ith file in the list.
2225 * @nosideeffects
2227 FileList.prototype.item = function(i) { return null; };
2230 * @type {boolean}
2231 * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#withcredentials
2233 XMLHttpRequest.prototype.withCredentials;
2236 * @type {XMLHttpRequestUpload}
2237 * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-upload-attribute
2239 XMLHttpRequest.prototype.upload;
2242 * @param {string} mimeType The mime type to override with.
2244 XMLHttpRequest.prototype.overrideMimeType = function(mimeType) {};
2247 * @type {string}
2248 * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-responsetype-attribute
2250 XMLHttpRequest.prototype.responseType;
2253 * @type {*}
2254 * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-responsetype-attribute
2256 XMLHttpRequest.prototype.response;
2260 * @type {ArrayBuffer}
2261 * Implemented as a draft spec in Firefox 4 as the way to get a requested array
2262 * buffer from an XMLHttpRequest.
2263 * @see https://developer.mozilla.org/En/Using_XMLHttpRequest#Receiving_binary_data_using_JavaScript_typed_arrays
2265 XMLHttpRequest.prototype.mozResponseArrayBuffer;
2268 * XMLHttpRequestEventTarget defines events for checking the status of a data
2269 * transfer between a client and a server. This should be a common base class
2270 * for XMLHttpRequest and XMLHttpRequestUpload.
2272 * @constructor
2273 * @implements {EventTarget}
2275 function XMLHttpRequestEventTarget() {}
2278 * @param {boolean=} opt_useCapture
2279 * @override
2281 XMLHttpRequestEventTarget.prototype.addEventListener = function(
2282 type, listener, opt_useCapture) {};
2285 * @param {boolean=} opt_useCapture
2286 * @override
2288 XMLHttpRequestEventTarget.prototype.removeEventListener = function(
2289 type, listener, opt_useCapture) {};
2291 /** @override */
2292 XMLHttpRequestEventTarget.prototype.dispatchEvent = function(evt) {};
2295 * An event target to track the status of an upload.
2297 * @constructor
2298 * @extends {XMLHttpRequestEventTarget}
2300 function XMLHttpRequestUpload() {}
2303 * @param {number=} opt_width
2304 * @param {number=} opt_height
2305 * @constructor
2306 * @extends {HTMLImageElement}
2308 function Image(opt_width, opt_height) {}
2312 * Dataset collection.
2313 * This is really a DOMStringMap but it behaves close enough to an object to
2314 * pass as an object.
2315 * @type {Object}
2316 * @const
2318 HTMLElement.prototype.dataset;
2322 * @constructor
2323 * @see https://dom.spec.whatwg.org/#interface-domtokenlist
2325 function DOMTokenList() {}
2328 * Returns the number of CSS classes applied to this Element.
2329 * @type {number}
2331 DOMTokenList.prototype.length;
2334 * @param {number} index The index of the item to return.
2335 * @return {string} The CSS class at the specified index.
2336 * @nosideeffects
2338 DOMTokenList.prototype.item = function(index) {};
2341 * @param {string} token The CSS class to check for.
2342 * @return {boolean} Whether the CSS class has been applied to the Element.
2343 * @nosideeffects
2345 DOMTokenList.prototype.contains = function(token) {};
2348 * @param {...string} var_args The CSS class(es) to add to this element.
2350 DOMTokenList.prototype.add = function(var_args) {};
2353 * @param {...string} var_args The CSS class(es) to remove from this element.
2355 DOMTokenList.prototype.remove = function(var_args) {};
2358 * @param {string} token The CSS class to toggle from this element.
2359 * @param {boolean=} opt_force True to add the class whether it exists
2360 * or not. False to remove the class whether it exists or not.
2361 * This argument is not supported on IE 10 and below, according to
2362 * the MDN page linked below.
2363 * @return {boolean} False if the token was removed; True otherwise.
2364 * @see https://developer.mozilla.org/en-US/docs/Web/API/Element.classList
2366 DOMTokenList.prototype.toggle = function(token, opt_force) {};
2369 * @return {string} A stringified representation of CSS classes.
2370 * @nosideeffects
2371 * @override
2373 DOMTokenList.prototype.toString = function() {};
2376 * A better interface to CSS classes than className.
2377 * @type {DOMTokenList}
2378 * @see http://www.w3.org/TR/html5/elements.html#dom-classlist
2379 * @const
2381 HTMLElement.prototype.classList;
2384 * Web Cryptography API
2385 * @see http://www.w3.org/TR/WebCryptoAPI/
2388 /** @see https://developer.mozilla.org/en/DOM/window.crypto */
2389 Window.prototype.crypto;
2392 * @see https://developer.mozilla.org/en/DOM/window.crypto.getRandomValues
2393 * @param {!ArrayBufferView} typedArray
2394 * @return {!ArrayBufferView}
2395 * @throws {Error}
2397 Window.prototype.crypto.getRandomValues = function(typedArray) {};
2400 * Constraint Validation API properties and methods
2401 * @see http://www.w3.org/TR/2009/WD-html5-20090423/forms.html#the-constraint-validation-api
2404 /** @return {boolean} */
2405 HTMLFormElement.prototype.checkValidity = function() {};
2407 /** @type {boolean} */
2408 HTMLFormElement.prototype.noValidate;
2410 /** @constructor */
2411 function ValidityState() {}
2413 /** @type {boolean} */
2414 ValidityState.prototype.customError;
2416 /** @type {boolean} */
2417 ValidityState.prototype.patternMismatch;
2419 /** @type {boolean} */
2420 ValidityState.prototype.rangeOverflow;
2422 /** @type {boolean} */
2423 ValidityState.prototype.rangeUnderflow;
2425 /** @type {boolean} */
2426 ValidityState.prototype.stepMismatch;
2428 /** @type {boolean} */
2429 ValidityState.prototype.typeMismatch;
2431 /** @type {boolean} */
2432 ValidityState.prototype.tooLong;
2434 /** @type {boolean} */
2435 ValidityState.prototype.valid;
2437 /** @type {boolean} */
2438 ValidityState.prototype.valueMissing;
2441 /** @type {boolean} */
2442 HTMLButtonElement.prototype.autofocus;
2445 * @const
2446 * @type {NodeList}
2448 HTMLButtonElement.prototype.labels;
2450 /** @type {string} */
2451 HTMLButtonElement.prototype.validationMessage;
2454 * @const
2455 * @type {ValidityState}
2457 HTMLButtonElement.prototype.validity;
2459 /** @type {boolean} */
2460 HTMLButtonElement.prototype.willValidate;
2462 /** @return {boolean} */
2463 HTMLButtonElement.prototype.checkValidity = function() {};
2465 /** @param {string} message */
2466 HTMLButtonElement.prototype.setCustomValidity = function(message) {};
2469 * @type {string}
2470 * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formaction
2472 HTMLButtonElement.prototype.formAction;
2475 * @type {string}
2476 * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formenctype
2478 HTMLButtonElement.prototype.formEnctype;
2481 * @type {string}
2482 * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formmethod
2484 HTMLButtonElement.prototype.formMethod;
2487 * @type {string}
2488 * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formtarget
2490 HTMLButtonElement.prototype.formTarget;
2492 /** @type {boolean} */
2493 HTMLInputElement.prototype.autofocus;
2495 /** @type {boolean} */
2496 HTMLInputElement.prototype.formNoValidate;
2499 * @type {string}
2500 * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formaction
2502 HTMLInputElement.prototype.formAction;
2505 * @type {string}
2506 * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formenctype
2508 HTMLInputElement.prototype.formEnctype;
2511 * @type {string}
2512 * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formmethod
2514 HTMLInputElement.prototype.formMethod;
2517 * @type {string}
2518 * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formtarget
2520 HTMLInputElement.prototype.formTarget;
2523 * @const
2524 * @type {NodeList}
2526 HTMLInputElement.prototype.labels;
2528 /** @type {string} */
2529 HTMLInputElement.prototype.validationMessage;
2532 * @const
2533 * @type {ValidityState}
2535 HTMLInputElement.prototype.validity;
2537 /** @type {boolean} */
2538 HTMLInputElement.prototype.willValidate;
2540 /** @return {boolean} */
2541 HTMLInputElement.prototype.checkValidity = function() {};
2543 /** @param {string} message */
2544 HTMLInputElement.prototype.setCustomValidity = function(message) {};
2546 /** @type {Element} */
2547 HTMLLabelElement.prototype.control;
2549 /** @type {boolean} */
2550 HTMLSelectElement.prototype.autofocus;
2553 * @const
2554 * @type {NodeList}
2556 HTMLSelectElement.prototype.labels;
2558 /** @type {HTMLCollection} */
2559 HTMLSelectElement.prototype.selectedOptions;
2561 /** @type {string} */
2562 HTMLSelectElement.prototype.validationMessage;
2565 * @const
2566 * @type {ValidityState}
2568 HTMLSelectElement.prototype.validity;
2570 /** @type {boolean} */
2571 HTMLSelectElement.prototype.willValidate;
2573 /** @return {boolean} */
2574 HTMLSelectElement.prototype.checkValidity = function() {};
2576 /** @param {string} message */
2577 HTMLSelectElement.prototype.setCustomValidity = function(message) {};
2579 /** @type {boolean} */
2580 HTMLTextAreaElement.prototype.autofocus;
2583 * @const
2584 * @type {NodeList}
2586 HTMLTextAreaElement.prototype.labels;
2588 /** @type {string} */
2589 HTMLTextAreaElement.prototype.validationMessage;
2592 * @const
2593 * @type {ValidityState}
2595 HTMLTextAreaElement.prototype.validity;
2597 /** @type {boolean} */
2598 HTMLTextAreaElement.prototype.willValidate;
2600 /** @return {boolean} */
2601 HTMLTextAreaElement.prototype.checkValidity = function() {};
2603 /** @param {string} message */
2604 HTMLTextAreaElement.prototype.setCustomValidity = function(message) {};
2607 * @constructor
2608 * @extends {HTMLElement}
2609 * @see http://www.w3.org/TR/html5/the-embed-element.html#htmlembedelement
2611 function HTMLEmbedElement() {}
2614 * @type {string}
2615 * @see http://www.w3.org/TR/html5/dimension-attributes.html#dom-dim-width
2617 HTMLEmbedElement.prototype.width;
2620 * @type {string}
2621 * @see http://www.w3.org/TR/html5/dimension-attributes.html#dom-dim-height
2623 HTMLEmbedElement.prototype.height;
2626 * @type {string}
2627 * @see http://www.w3.org/TR/html5/the-embed-element.html#dom-embed-src
2629 HTMLEmbedElement.prototype.src;
2632 * @type {string}
2633 * @see http://www.w3.org/TR/html5/the-embed-element.html#dom-embed-type
2635 HTMLEmbedElement.prototype.type;
2637 // Fullscreen APIs.
2640 * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-element-requestfullscreen
2642 Element.prototype.requestFullscreen = function() {};
2645 * @type {boolean}
2646 * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-document-fullscreenenabled
2648 Document.prototype.fullscreenEnabled;
2651 * @type {Element}
2652 * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-document-fullscreenelement
2654 Document.prototype.fullscreenElement;
2657 * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-document-exitfullscreen
2659 Document.prototype.exitFullscreen = function() {};
2661 // Externs definitions of browser current implementations.
2662 // Firefox 10 implementation.
2663 Element.prototype.mozRequestFullScreen = function() {};
2665 Element.prototype.mozRequestFullScreenWithKeys = function() {};
2667 /** @type {boolean} */
2668 Document.prototype.mozFullScreen;
2670 Document.prototype.mozCancelFullScreen = function() {};
2672 /** @type {Element} */
2673 Document.prototype.mozFullScreenElement;
2675 /** @type {boolean} */
2676 Document.prototype.mozFullScreenEnabled;
2678 // Chrome 21 implementation.
2680 * The current fullscreen element for the document is set to this element.
2681 * Valid only for Webkit browsers.
2682 * @param {number=} opt_allowKeyboardInput Whether keyboard input is desired.
2683 * Should use ALLOW_KEYBOARD_INPUT constant.
2685 Element.prototype.webkitRequestFullScreen = function(opt_allowKeyboardInput) {};
2688 * The current fullscreen element for the document is set to this element.
2689 * Valid only for Webkit browsers.
2690 * @param {number=} opt_allowKeyboardInput Whether keyboard input is desired.
2691 * Should use ALLOW_KEYBOARD_INPUT constant.
2693 Element.prototype.webkitRequestFullscreen = function(opt_allowKeyboardInput) {};
2695 /** @type {boolean} */
2696 Document.prototype.webkitIsFullScreen;
2698 Document.prototype.webkitCancelFullScreen = function() {};
2700 /** @type {Element} */
2701 Document.prototype.webkitCurrentFullScreenElement;
2703 /** @type {Element} */
2704 Document.prototype.webkitFullscreenElement;
2706 /** @type {boolean} */
2707 Document.prototype.webkitFullScreenKeyboardInputAllowed;
2709 // IE 11 implementation.
2710 // http://msdn.microsoft.com/en-us/library/ie/dn265028(v=vs.85).aspx
2711 /** @return {void} */
2712 Element.prototype.msRequestFullscreen = function() {};
2714 /** @return {void} */
2715 Element.prototype.msExitFullscreen = function() {};
2717 /** @type {boolean} */
2718 Document.prototype.msFullscreenEnabled;
2720 /** @type {Element} */
2721 Document.prototype.msFullscreenElement;
2723 /** @type {number} */
2724 Element.ALLOW_KEYBOARD_INPUT = 1;
2726 /** @type {number} */
2727 Element.prototype.ALLOW_KEYBOARD_INPUT = 1;
2730 /** @constructor */
2731 function MutationObserverInit() {}
2733 /** @type {boolean} */
2734 MutationObserverInit.prototype.childList;
2736 /** @type {boolean} */
2737 MutationObserverInit.prototype.attributes;
2739 /** @type {boolean} */
2740 MutationObserverInit.prototype.characterData;
2742 /** @type {boolean} */
2743 MutationObserverInit.prototype.subtree;
2745 /** @type {boolean} */
2746 MutationObserverInit.prototype.attributeOldValue;
2748 /** @type {boolean} */
2749 MutationObserverInit.prototype.characterDataOldValue;
2751 /** @type {Array.<string>} */
2752 MutationObserverInit.prototype.attributeFilter;
2755 /** @constructor */
2756 function MutationRecord() {}
2758 /** @type {string} */
2759 MutationRecord.prototype.type;
2761 /** @type {Node} */
2762 MutationRecord.prototype.target;
2764 /** @type {NodeList} */
2765 MutationRecord.prototype.addedNodes;
2767 /** @type {NodeList} */
2768 MutationRecord.prototype.removedNodes;
2770 /** @type {Node} */
2771 MutationRecord.prototype.previouSibling;
2773 /** @type {Node} */
2774 MutationRecord.prototype.nextSibling;
2776 /** @type {?string} */
2777 MutationRecord.prototype.attributeName;
2779 /** @type {?string} */
2780 MutationRecord.prototype.attributeNamespace;
2782 /** @type {?string} */
2783 MutationRecord.prototype.oldValue;
2787 * @see http://www.w3.org/TR/domcore/#mutation-observers
2788 * @param {function(Array.<MutationRecord>, MutationObserver)} callback
2789 * @constructor
2791 function MutationObserver(callback) {}
2794 * @param {Node} target
2795 * @param {MutationObserverInit=} options
2797 MutationObserver.prototype.observe = function(target, options) {};
2799 MutationObserver.prototype.disconnect = function() {};
2802 * @type {function(new:MutationObserver, function(Array.<MutationRecord>))}
2804 Window.prototype.WebKitMutationObserver;
2807 * @type {function(new:MutationObserver, function(Array.<MutationRecord>))}
2809 Window.prototype.MozMutationObserver;
2813 * @see http://www.w3.org/TR/page-visibility/
2814 * @type {VisibilityState}
2816 Document.prototype.visibilityState;
2819 * @type {string}
2821 Document.prototype.webkitVisibilityState;
2824 * @type {string}
2826 Document.prototype.msVisibilityState;
2829 * @see http://www.w3.org/TR/page-visibility/
2830 * @type {boolean}
2832 Document.prototype.hidden;
2835 * @type {boolean}
2837 Document.prototype.webkitHidden;
2840 * @type {boolean}
2842 Document.prototype.msHidden;
2845 * @see http://www.w3.org/TR/components-intro/
2846 * @see http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-interface-to-register
2847 * @param {string} type
2848 * @param {{extends: (string|undefined), prototype: (Object|undefined)}} options
2850 Document.prototype.registerElement;
2853 * This method is deprecated and should be removed by the end of 2014.
2854 * @see http://www.w3.org/TR/components-intro/
2855 * @see http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-interface-to-register
2856 * @param {string} type
2857 * @param {{extends: (string|undefined), prototype: (Object|undefined)}} options
2859 Document.prototype.register;
2862 * @type {!FontFaceSet}
2863 * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontfacesource-fonts
2865 Document.prototype.fonts;
2869 * Definition of ShadowRoot interface,
2870 * @see http://www.w3.org/TR/shadow-dom/#api-shadow-root
2871 * @constructor
2872 * @extends {DocumentFragment}
2874 function ShadowRoot() {}
2877 * The host element that a ShadowRoot is attached to.
2878 * Note: this is not yet W3C standard but is undergoing development.
2879 * W3C feature tracking bug:
2880 * https://www.w3.org/Bugs/Public/show_bug.cgi?id=22399
2881 * Draft specification:
2882 * https://dvcs.w3.org/hg/webcomponents/raw-file/6743f1ace623/spec/shadow/index.html#shadow-root-object
2883 * @type {!Element}
2885 ShadowRoot.prototype.host;
2888 * @param {string} id id.
2889 * @return {HTMLElement}
2890 * @nosideeffects
2892 ShadowRoot.prototype.getElementById = function(id) {};
2896 * @param {string} className
2897 * @return {!NodeList}
2898 * @nosideeffects
2900 ShadowRoot.prototype.getElementsByClassName = function(className) {};
2904 * @param {string} tagName
2905 * @return {!NodeList}
2906 * @nosideeffects
2908 ShadowRoot.prototype.getElementsByTagName = function(tagName) {};
2912 * @param {string} namespace
2913 * @param {string} localName
2914 * @return {!NodeList}
2915 * @nosideeffects
2917 ShadowRoot.prototype.getElementsByTagNameNS = function(namespace, localName) {};
2921 * @return {Selection}
2922 * @nosideeffects
2924 ShadowRoot.prototype.getSelection = function() {};
2928 * @param {number} x
2929 * @param {number} y
2930 * @return {Element}
2931 * @nosideeffects
2933 ShadowRoot.prototype.elementFromPoint = function(x, y) {};
2937 * @type {boolean}
2939 ShadowRoot.prototype.applyAuthorStyles;
2943 * @type {boolean}
2945 ShadowRoot.prototype.resetStyleInheritance;
2949 * @type {Element}
2951 ShadowRoot.prototype.activeElement;
2955 * @type {?ShadowRoot}
2957 ShadowRoot.prototype.olderShadowRoot;
2961 * @type {string}
2963 ShadowRoot.prototype.innerHTML;
2967 * @type {!StyleSheetList}
2969 ShadowRoot.prototype.styleSheets;
2974 * @see http://www.w3.org/TR/shadow-dom/#the-content-element
2975 * @constructor
2976 * @extends {HTMLElement}
2978 function HTMLContentElement() {}
2981 * @type {!string}
2983 HTMLContentElement.prototype.select;
2986 * @return {!NodeList}
2988 HTMLContentElement.prototype.getDistributedNodes = function() {};
2992 * @see http://www.w3.org/TR/shadow-dom/#the-shadow-element
2993 * @constructor
2994 * @extends {HTMLElement}
2996 function HTMLShadowElement() {}
2999 * @return {!NodeList}
3001 HTMLShadowElement.prototype.getDistributedNodes = function() {};
3005 * @see http://www.w3.org/TR/html5/webappapis.html#the-errorevent-interface
3007 * @constructor
3008 * @extends {Event}
3010 * @param {string} type
3011 * @param {ErrorEventInit=} opt_eventInitDict
3013 function ErrorEvent(type, opt_eventInitDict) {}
3015 /** @const {string} */
3016 ErrorEvent.prototype.message;
3018 /** @const {string} */
3019 ErrorEvent.prototype.filename;
3021 /** @const {number} */
3022 ErrorEvent.prototype.lineno;
3024 /** @const {number} */
3025 ErrorEvent.prototype.colno;
3027 /** @const {*} */
3028 ErrorEvent.prototype.error;
3032 * @see http://www.w3.org/TR/html5/webappapis.html#the-errorevent-interface
3034 * @typedef {{
3035 * bubbles: (boolean|undefined),
3036 * cancelable: (boolean|undefined),
3037 * message: string,
3038 * filename: string,
3039 * lineno: number,
3040 * colno: number,
3041 * error: *
3042 * }}
3044 var ErrorEventInit;
3048 * @see http://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument
3049 * @param {string=} opt_title A title to give the new HTML document
3050 * @return {!HTMLDocument}
3052 DOMImplementation.prototype.createHTMLDocument = function(opt_title) {};
3057 * @constructor
3058 * @see https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element
3059 * @extends {HTMLElement}
3061 function HTMLPictureElement() {}
3064 * @constructor
3065 * @see https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element
3066 * @extends {HTMLElement}
3068 function HTMLSourceElement() {}
3070 /** @type {string} */
3071 HTMLSourceElement.prototype.media;
3073 /** @type {string} */
3074 HTMLSourceElement.prototype.sizes;
3076 /** @type {string} */
3077 HTMLSourceElement.prototype.src;
3079 /** @type {string} */
3080 HTMLSourceElement.prototype.srcset;
3082 /** @type {string} */
3083 HTMLSourceElement.prototype.type;
3085 /** @type {string} */
3086 HTMLImageElement.prototype.sizes;
3088 /** @type {string} */
3089 HTMLImageElement.prototype.srcset;
3093 * 4.11 Interactive elements
3094 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html
3098 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#the-details-element
3099 * @constructor
3100 * @extends {HTMLElement}
3102 function HTMLDetailsElement() {}
3105 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-details-open
3106 * @type {boolean}
3108 HTMLDetailsElement.prototype.open;
3111 // As of 2/20/2015, <summary> has no special web IDL interface nor global
3112 // constructor (i.e. HTMLSummaryElement).
3116 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menu-type
3117 * @type {string}
3119 HTMLMenuElement.prototype.type;
3122 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menu-label
3123 * @type {string}
3125 HTMLMenuElement.prototype.label;
3129 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#the-menuitem-element
3130 * @constructor
3131 * @extends {HTMLElement}
3133 function HTMLMenuItemElement() {}
3136 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-type
3137 * @type {string}
3139 HTMLMenuItemElement.prototype.type;
3142 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-label
3143 * @type {string}
3145 HTMLMenuItemElement.prototype.label;
3148 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-icon
3149 * @type {string}
3151 HTMLMenuItemElement.prototype.icon;
3154 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-disabled
3155 * @type {boolean}
3157 HTMLMenuItemElement.prototype.disabled;
3160 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-checked
3161 * @type {boolean}
3163 HTMLMenuItemElement.prototype.checked;
3166 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-radiogroup
3167 * @type {string}
3169 HTMLMenuItemElement.prototype.radiogroup;
3172 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-default
3173 * @type {boolean}
3175 HTMLMenuItemElement.prototype.default;
3177 // TODO(dbeam): add HTMLMenuItemElement.prototype.command if it's implemented.
3181 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#relatedevent
3182 * @param {string} type
3183 * @param {{relatedTarget: (EventTarget|undefined)}=} opt_eventInitDict
3184 * @constructor
3185 * @extends {Event}
3187 function RelatedEvent(type, opt_eventInitDict) {}
3190 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-relatedevent-relatedtarget
3191 * @type {EventTarget|undefined}
3193 RelatedEvent.prototype.relatedTarget;
3197 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#the-dialog-element
3198 * @constructor
3199 * @extends {HTMLElement}
3201 function HTMLDialogElement() {}
3204 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-dialog-open
3205 * @type {boolean}
3207 HTMLDialogElement.prototype.open;
3210 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-dialog-returnvalue
3211 * @type {string}
3213 HTMLDialogElement.prototype.returnValue;
3216 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-dialog-show
3217 * @param {(MouseEvent|Element)=} opt_anchor
3219 HTMLDialogElement.prototype.show = function(opt_anchor) {};
3222 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-dialog-showmodal
3223 * @param {(MouseEvent|Element)=} opt_anchor
3225 HTMLDialogElement.prototype.showModal = function(opt_anchor) {};
3228 * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-dialog-close
3229 * @param {string=} opt_returnValue
3231 HTMLDialogElement.prototype.close = function(opt_returnValue) {};