| 1 | /* |
| 2 | * Copyright 2008 Closure Compiler Authors |
| 3 | * |
| 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 |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 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. |
| 15 | */ |
| 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. |
| 20 | * |
| 21 | * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/index.html |
| 22 | * @see http://dev.w3.org/html5/spec/Overview.html |
| 23 | * |
| 24 | * This also includes Typed Array definitions from |
| 25 | * http://www.khronos.org/registry/typedarray/specs/latest/ |
| 26 | * |
| 27 | * This relies on w3c_event.js being included first. |
| 28 | * |
| 29 | * @externs |
| 30 | */ |
| 31 | |
| 32 | /* |
| 33 | * JSON API. |
| 34 | */ |
| 35 | |
| 36 | /** |
| 37 | * @see https://developer.mozilla.org/En/Using_native_JSON |
| 38 | * @type {!JSONType} |
| 39 | */ |
| 40 | Window.prototype.JSON; |
| 41 | |
| 42 | /** |
| 43 | * @constructor |
| 44 | * @extends {HTMLElement} |
| 45 | */ |
| 46 | function HTMLCanvasElement() {} |
| 47 | |
| 48 | /** @type {number} */ |
| 49 | HTMLCanvasElement.prototype.width; |
| 50 | |
| 51 | /** @type {number} */ |
| 52 | HTMLCanvasElement.prototype.height; |
| 53 | |
| 54 | /** |
| 55 | * @param {string=} opt_type |
| 56 | * @return {string} |
| 57 | * @throws {Error} |
| 58 | * @nosideeffects |
| 59 | */ |
| 60 | HTMLCanvasElement.prototype.toDataURL = function(opt_type) {}; |
| 61 | |
| 62 | /** |
| 63 | * @param {string} contextId |
| 64 | * @param {Object=} opt_args |
| 65 | * @return {Object} |
| 66 | */ |
| 67 | HTMLCanvasElement.prototype.getContext = function(contextId, opt_args) {}; |
| 68 | |
| 69 | /** |
| 70 | * @constructor |
| 71 | */ |
| 72 | function CanvasRenderingContext2D() {} |
| 73 | |
| 74 | /** @type {HTMLCanvasElement} */ |
| 75 | CanvasRenderingContext2D.prototype.canvas; |
| 76 | |
| 77 | /** |
| 78 | * @return {undefined} |
| 79 | */ |
| 80 | CanvasRenderingContext2D.prototype.save = function() {}; |
| 81 | |
| 82 | /** |
| 83 | * @return {undefined} |
| 84 | */ |
| 85 | CanvasRenderingContext2D.prototype.restore = function() {}; |
| 86 | |
| 87 | /** |
| 88 | * @param {number} x |
| 89 | * @param {number} y |
| 90 | * @return {undefined} |
| 91 | */ |
| 92 | CanvasRenderingContext2D.prototype.scale = function(x, y) {}; |
| 93 | |
| 94 | /** |
| 95 | * @param {number} angle |
| 96 | * @return {undefined} |
| 97 | */ |
| 98 | CanvasRenderingContext2D.prototype.rotate = function(angle) {}; |
| 99 | |
| 100 | /** |
| 101 | * @param {number} x |
| 102 | * @param {number} y |
| 103 | * @return {undefined} |
| 104 | */ |
| 105 | CanvasRenderingContext2D.prototype.translate = function(x, y) {}; |
| 106 | |
| 107 | /** |
| 108 | * @param {number} m11 |
| 109 | * @param {number} m12 |
| 110 | * @param {number} m21 |
| 111 | * @param {number} m22 |
| 112 | * @param {number} dx |
| 113 | * @param {number} dy |
| 114 | * @return {undefined} |
| 115 | */ |
| 116 | CanvasRenderingContext2D.prototype.transform = function( |
| 117 | m11, m12, m21, m22, dx, dy) {}; |
| 118 | |
| 119 | /** |
| 120 | * @param {number} m11 |
| 121 | * @param {number} m12 |
| 122 | * @param {number} m21 |
| 123 | * @param {number} m22 |
| 124 | * @param {number} dx |
| 125 | * @param {number} dy |
| 126 | * @return {undefined} |
| 127 | */ |
| 128 | CanvasRenderingContext2D.prototype.setTransform = function( |
| 129 | m11, m12, m21, m22, dx, dy) {}; |
| 130 | |
| 131 | /** |
| 132 | * @param {number} x0 |
| 133 | * @param {number} y0 |
| 134 | * @param {number} x1 |
| 135 | * @param {number} y1 |
| 136 | * @return {CanvasGradient} |
| 137 | * @throws {Error} |
| 138 | * @nosideeffects |
| 139 | */ |
| 140 | CanvasRenderingContext2D.prototype.createLinearGradient = function( |
| 141 | x0, y0, x1, y1) {}; |
| 142 | |
| 143 | /** |
| 144 | * @param {number} x0 |
| 145 | * @param {number} y0 |
| 146 | * @param {number} r0 |
| 147 | * @param {number} x1 |
| 148 | * @param {number} y1 |
| 149 | * @param {number} r1 |
| 150 | * @return {CanvasGradient} |
| 151 | * @throws {Error} |
| 152 | * @nosideeffects |
| 153 | */ |
| 154 | CanvasRenderingContext2D.prototype.createRadialGradient = function( |
| 155 | x0, y0, r0, x1, y1, r1) {}; |
| 156 | |
| 157 | /** |
| 158 | * @param {HTMLImageElement|HTMLCanvasElement} image |
| 159 | * @param {string} repetition |
| 160 | * @return {CanvasPattern} |
| 161 | * @throws {Error} |
| 162 | * @nosideeffects |
| 163 | */ |
| 164 | CanvasRenderingContext2D.prototype.createPattern = function( |
| 165 | image, repetition) {}; |
| 166 | |
| 167 | /** |
| 168 | * @param {number} x |
| 169 | * @param {number} y |
| 170 | * @param {number} w |
| 171 | * @param {number} h |
| 172 | * @return {undefined} |
| 173 | */ |
| 174 | CanvasRenderingContext2D.prototype.clearRect = function(x, y, w, h) {}; |
| 175 | |
| 176 | /** |
| 177 | * @param {number} x |
| 178 | * @param {number} y |
| 179 | * @param {number} w |
| 180 | * @param {number} h |
| 181 | * @return {undefined} |
| 182 | */ |
| 183 | CanvasRenderingContext2D.prototype.fillRect = function(x, y, w, h) {}; |
| 184 | |
| 185 | /** |
| 186 | * @param {number} x |
| 187 | * @param {number} y |
| 188 | * @param {number} w |
| 189 | * @param {number} h |
| 190 | * @return {undefined} |
| 191 | */ |
| 192 | CanvasRenderingContext2D.prototype.strokeRect = function(x, y, w, h) {}; |
| 193 | |
| 194 | /** |
| 195 | * @return {undefined} |
| 196 | */ |
| 197 | CanvasRenderingContext2D.prototype.beginPath = function() {}; |
| 198 | |
| 199 | /** |
| 200 | * @return {undefined} |
| 201 | */ |
| 202 | CanvasRenderingContext2D.prototype.closePath = function() {}; |
| 203 | |
| 204 | /** |
| 205 | * @param {number} x |
| 206 | * @param {number} y |
| 207 | * @return {undefined} |
| 208 | */ |
| 209 | CanvasRenderingContext2D.prototype.moveTo = function(x, y) {}; |
| 210 | |
| 211 | /** |
| 212 | * @param {number} x |
| 213 | * @param {number} y |
| 214 | * @return {undefined} |
| 215 | */ |
| 216 | CanvasRenderingContext2D.prototype.lineTo = function(x, y) {}; |
| 217 | |
| 218 | /** |
| 219 | * @param {number} cpx |
| 220 | * @param {number} cpy |
| 221 | * @param {number} x |
| 222 | * @param {number} y |
| 223 | * @return {undefined} |
| 224 | */ |
| 225 | CanvasRenderingContext2D.prototype.quadraticCurveTo = function( |
| 226 | cpx, cpy, x, y) {}; |
| 227 | |
| 228 | /** |
| 229 | * @param {number} cp1x |
| 230 | * @param {number} cp1y |
| 231 | * @param {number} cp2x |
| 232 | * @param {number} cp2y |
| 233 | * @param {number} x |
| 234 | * @param {number} y |
| 235 | * @return {undefined} |
| 236 | */ |
| 237 | CanvasRenderingContext2D.prototype.bezierCurveTo = function( |
| 238 | cp1x, cp1y, cp2x, cp2y, x, y) {}; |
| 239 | |
| 240 | /** |
| 241 | * @param {number} x1 |
| 242 | * @param {number} y1 |
| 243 | * @param {number} x2 |
| 244 | * @param {number} y2 |
| 245 | * @param {number} radius |
| 246 | * @return {undefined} |
| 247 | */ |
| 248 | CanvasRenderingContext2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {}; |
| 249 | |
| 250 | /** |
| 251 | * @param {number} x |
| 252 | * @param {number} y |
| 253 | * @param {number} w |
| 254 | * @param {number} h |
| 255 | * @return {undefined} |
| 256 | */ |
| 257 | CanvasRenderingContext2D.prototype.rect = function(x, y, w, h) {}; |
| 258 | |
| 259 | /** |
| 260 | * @param {number} x |
| 261 | * @param {number} y |
| 262 | * @param {number} radius |
| 263 | * @param {number} startAngle |
| 264 | * @param {number} endAngle |
| 265 | * @param {boolean} anticlockwise |
| 266 | * @return {undefined} |
| 267 | */ |
| 268 | CanvasRenderingContext2D.prototype.arc = function( |
| 269 | x, y, radius, startAngle, endAngle, anticlockwise) {}; |
| 270 | |
| 271 | /** |
| 272 | * @return {undefined} |
| 273 | */ |
| 274 | CanvasRenderingContext2D.prototype.fill = function() {}; |
| 275 | |
| 276 | /** |
| 277 | * @return {undefined} |
| 278 | */ |
| 279 | CanvasRenderingContext2D.prototype.stroke = function() {}; |
| 280 | |
| 281 | /** |
| 282 | * @return {undefined} |
| 283 | */ |
| 284 | CanvasRenderingContext2D.prototype.clip = function() {}; |
| 285 | |
| 286 | /** |
| 287 | * @param {number} x |
| 288 | * @param {number} y |
| 289 | * @return {boolean} |
| 290 | * @nosideeffects |
| 291 | */ |
| 292 | CanvasRenderingContext2D.prototype.isPointInPath = function(x, y) {}; |
| 293 | |
| 294 | /** |
| 295 | * @param {string} text |
| 296 | * @param {number} x |
| 297 | * @param {number} y |
| 298 | * @param {number=} opt_maxWidth |
| 299 | * @return {undefined} |
| 300 | */ |
| 301 | CanvasRenderingContext2D.prototype.fillText = function( |
| 302 | text, x, y, opt_maxWidth) {}; |
| 303 | |
| 304 | /** |
| 305 | * @param {string} text |
| 306 | * @param {number} x |
| 307 | * @param {number} y |
| 308 | * @param {number=} opt_maxWidth |
| 309 | * @return {undefined} |
| 310 | */ |
| 311 | CanvasRenderingContext2D.prototype.strokeText = function( |
| 312 | text, x, y, opt_maxWidth) {}; |
| 313 | |
| 314 | /** |
| 315 | * @param {string} text |
| 316 | * @return {TextMetrics} |
| 317 | * @nosideeffects |
| 318 | */ |
| 319 | CanvasRenderingContext2D.prototype.measureText = function(text) {}; |
| 320 | |
| 321 | /** |
| 322 | * @param {HTMLImageElement|HTMLCanvasElement|Image|HTMLVideoElement} image |
| 323 | * @param {number} dx Destination x coordinate. |
| 324 | * @param {number} dy Destination y coordinate. |
| 325 | * @param {number=} opt_dw Destination box width. Defaults to the image width. |
| 326 | * @param {number=} opt_dh Destination box height. Defaults to the image height. |
| 327 | * @param {number=} opt_sx Source box x coordinate. Used to select a portion of |
| 328 | * the source image to draw. Defaults to 0. |
| 329 | * @param {number=} opt_sy Source box y coordinate. Used to select a portion of |
| 330 | * the source image to draw. Defaults to 0. |
| 331 | * @param {number=} opt_sw Source box width. Used to select a portion of |
| 332 | * the source image to draw. Defaults to the full image width. |
| 333 | * @param {number=} opt_sh Source box height. Used to select a portion of |
| 334 | * the source image to draw. Defaults to the full image height. |
| 335 | * @return {undefined} |
| 336 | */ |
| 337 | CanvasRenderingContext2D.prototype.drawImage = function( |
| 338 | image, dx, dy, opt_dw, opt_dh, opt_sx, opt_sy, opt_sw, opt_sh) {}; |
| 339 | |
| 340 | /** |
| 341 | * @param {number} sw |
| 342 | * @param {number} sh |
| 343 | * @return {ImageData} |
| 344 | * @nosideeffects |
| 345 | */ |
| 346 | CanvasRenderingContext2D.prototype.createImageData = function(sw, sh) {}; |
| 347 | |
| 348 | /** |
| 349 | * @param {number} sx |
| 350 | * @param {number} sy |
| 351 | * @param {number} sw |
| 352 | * @param {number} sh |
| 353 | * @return {ImageData} |
| 354 | * @throws {Error} |
| 355 | * @nosideeffects |
| 356 | */ |
| 357 | CanvasRenderingContext2D.prototype.getImageData = function(sx, sy, sw, sh) {}; |
| 358 | |
| 359 | /** |
| 360 | * @param {ImageData} imagedata |
| 361 | * @param {number} dx |
| 362 | * @param {number} dy |
| 363 | * @param {number=} opt_dirtyX |
| 364 | * @param {number=} opt_dirtyY |
| 365 | * @param {number=} opt_dirtyWidth |
| 366 | * @param {number=} opt_dirtyHeight |
| 367 | * @return {undefined} |
| 368 | */ |
| 369 | CanvasRenderingContext2D.prototype.putImageData = function(imagedata, dx, dy, |
| 370 | opt_dirtyX, opt_dirtyY, opt_dirtyWidth, opt_dirtyHeight) {}; |
| 371 | |
| 372 | /** |
| 373 | * Note: WebKit only |
| 374 | * @param {number|string=} opt_a |
| 375 | * @param {number=} opt_b |
| 376 | * @param {number=} opt_c |
| 377 | * @param {number=} opt_d |
| 378 | * @param {number=} opt_e |
| 379 | * @see http://developer.apple.com/library/safari/#documentation/appleapplications/reference/WebKitDOMRef/CanvasRenderingContext2D_idl/Classes/CanvasRenderingContext2D/index.html |
| 380 | * @return {undefined} |
| 381 | */ |
| 382 | CanvasRenderingContext2D.prototype.setFillColor; |
| 383 | |
| 384 | /** |
| 385 | * Note: WebKit only |
| 386 | * @param {number|string=} opt_a |
| 387 | * @param {number=} opt_b |
| 388 | * @param {number=} opt_c |
| 389 | * @param {number=} opt_d |
| 390 | * @param {number=} opt_e |
| 391 | * @see http://developer.apple.com/library/safari/#documentation/appleapplications/reference/WebKitDOMRef/CanvasRenderingContext2D_idl/Classes/CanvasRenderingContext2D/index.html |
| 392 | * @return {undefined} |
| 393 | */ |
| 394 | CanvasRenderingContext2D.prototype.setStrokeColor; |
| 395 | |
| 396 | /** |
| 397 | * @return {Array.<number>} |
| 398 | */ |
| 399 | CanvasRenderingContext2D.prototype.getLineDash; |
| 400 | |
| 401 | /** |
| 402 | * @param {Array.<number>} segments |
| 403 | * @return {undefined} |
| 404 | */ |
| 405 | CanvasRenderingContext2D.prototype.setLineDash; |
| 406 | |
| 407 | /** @type {string} */ |
| 408 | CanvasRenderingContext2D.prototype.fillColor; |
| 409 | |
| 410 | /** |
| 411 | * @type {string} |
| 412 | * @implicitCast |
| 413 | */ |
| 414 | CanvasRenderingContext2D.prototype.fillStyle; |
| 415 | |
| 416 | /** @type {string} */ |
| 417 | CanvasRenderingContext2D.prototype.font; |
| 418 | |
| 419 | /** @type {number} */ |
| 420 | CanvasRenderingContext2D.prototype.globalAlpha; |
| 421 | |
| 422 | /** @type {string} */ |
| 423 | CanvasRenderingContext2D.prototype.globalCompositeOperation; |
| 424 | |
| 425 | /** @type {number} */ |
| 426 | CanvasRenderingContext2D.prototype.lineWidth; |
| 427 | |
| 428 | /** @type {string} */ |
| 429 | CanvasRenderingContext2D.prototype.lineCap; |
| 430 | |
| 431 | /** @type {string} */ |
| 432 | CanvasRenderingContext2D.prototype.lineJoin; |
| 433 | |
| 434 | /** @type {number} */ |
| 435 | CanvasRenderingContext2D.prototype.miterLimit; |
| 436 | |
| 437 | /** @type {number} */ |
| 438 | CanvasRenderingContext2D.prototype.shadowBlur; |
| 439 | |
| 440 | /** @type {string} */ |
| 441 | CanvasRenderingContext2D.prototype.shadowColor; |
| 442 | |
| 443 | /** @type {number} */ |
| 444 | CanvasRenderingContext2D.prototype.shadowOffsetX; |
| 445 | |
| 446 | /** @type {number} */ |
| 447 | CanvasRenderingContext2D.prototype.shadowOffsetY; |
| 448 | |
| 449 | /** |
| 450 | * @type {string} |
| 451 | * @implicitCast |
| 452 | */ |
| 453 | CanvasRenderingContext2D.prototype.strokeStyle; |
| 454 | |
| 455 | /** @type {string} */ |
| 456 | CanvasRenderingContext2D.prototype.strokeColor; |
| 457 | |
| 458 | /** @type {string} */ |
| 459 | CanvasRenderingContext2D.prototype.textAlign; |
| 460 | |
| 461 | /** @type {string} */ |
| 462 | CanvasRenderingContext2D.prototype.textBaseline; |
| 463 | |
| 464 | /** |
| 465 | * @constructor |
| 466 | */ |
| 467 | function CanvasGradient() {} |
| 468 | |
| 469 | /** |
| 470 | * @param {number} offset |
| 471 | * @param {string} color |
| 472 | * @return {undefined} |
| 473 | */ |
| 474 | CanvasGradient.prototype.addColorStop = function(offset, color) {}; |
| 475 | |
| 476 | /** |
| 477 | * @constructor |
| 478 | */ |
| 479 | function CanvasPattern() {} |
| 480 | |
| 481 | /** |
| 482 | * @constructor |
| 483 | */ |
| 484 | function TextMetrics() {} |
| 485 | |
| 486 | /** @type {number} */ |
| 487 | TextMetrics.prototype.width; |
| 488 | |
| 489 | /** |
| 490 | * @constructor |
| 491 | */ |
| 492 | function ImageData() {} |
| 493 | |
| 494 | /** @type {Uint8ClampedArray} */ |
| 495 | ImageData.prototype.data; |
| 496 | |
| 497 | /** @type {number} */ |
| 498 | ImageData.prototype.width; |
| 499 | |
| 500 | /** @type {number} */ |
| 501 | ImageData.prototype.height; |
| 502 | |
| 503 | /** |
| 504 | * @constructor |
| 505 | */ |
| 506 | function ClientInformation() {} |
| 507 | |
| 508 | /** @type {boolean} */ |
| 509 | ClientInformation.prototype.onLine; |
| 510 | |
| 511 | /** |
| 512 | * @param {string} protocol |
| 513 | * @param {string} uri |
| 514 | * @param {string} title |
| 515 | * @return {undefined} |
| 516 | */ |
| 517 | ClientInformation.prototype.registerProtocolHandler = function( |
| 518 | protocol, uri, title) {}; |
| 519 | |
| 520 | /** |
| 521 | * @param {string} mimeType |
| 522 | * @param {string} uri |
| 523 | * @param {string} title |
| 524 | * @return {undefined} |
| 525 | */ |
| 526 | ClientInformation.prototype.registerContentHandler = function( |
| 527 | mimeType, uri, title) {}; |
| 528 | |
| 529 | // HTML5 Database objects |
| 530 | /** |
| 531 | * @constructor |
| 532 | */ |
| 533 | function Database() {} |
| 534 | |
| 535 | /** |
| 536 | * @type {string} |
| 537 | */ |
| 538 | Database.prototype.version; |
| 539 | |
| 540 | /** |
| 541 | * @param {function(!SQLTransaction) : void} callback |
| 542 | * @param {(function(!SQLError) : void)=} opt_errorCallback |
| 543 | * @param {Function=} opt_Callback |
| 544 | */ |
| 545 | Database.prototype.transaction = function( |
| 546 | callback, opt_errorCallback, opt_Callback) {}; |
| 547 | |
| 548 | /** |
| 549 | * @param {function(!SQLTransaction) : void} callback |
| 550 | * @param {(function(!SQLError) : void)=} opt_errorCallback |
| 551 | * @param {Function=} opt_Callback |
| 552 | */ |
| 553 | Database.prototype.readTransaction = function( |
| 554 | callback, opt_errorCallback, opt_Callback) {}; |
| 555 | |
| 556 | /** |
| 557 | * @param {string} oldVersion |
| 558 | * @param {string} newVersion |
| 559 | * @param {function(!SQLTransaction) : void} callback |
| 560 | * @param {function(!SQLError) : void} errorCallback |
| 561 | * @param {Function} successCallback |
| 562 | */ |
| 563 | Database.prototype.changeVersion = function( |
| 564 | oldVersion, newVersion, callback, errorCallback, successCallback) {}; |
| 565 | |
| 566 | /** |
| 567 | * @interface |
| 568 | */ |
| 569 | function DatabaseCallback() {} |
| 570 | |
| 571 | /** |
| 572 | * @param {!Database} db |
| 573 | * @return {undefined} |
| 574 | */ |
| 575 | DatabaseCallback.prototype.handleEvent = function(db) {}; |
| 576 | |
| 577 | /** |
| 578 | * @constructor |
| 579 | */ |
| 580 | function SQLError() {} |
| 581 | |
| 582 | /** |
| 583 | * @type {number} |
| 584 | */ |
| 585 | SQLError.prototype.code; |
| 586 | |
| 587 | /** |
| 588 | * @type {string} |
| 589 | */ |
| 590 | SQLError.prototype.message; |
| 591 | |
| 592 | /** |
| 593 | * @constructor |
| 594 | */ |
| 595 | function SQLTransaction() {} |
| 596 | |
| 597 | /** |
| 598 | * @param {string} sqlStatement |
| 599 | * @param {Array.<*>=} opt_queryArgs |
| 600 | * @param {SQLStatementCallback=} opt_callback |
| 601 | * @param {(function(!SQLTransaction, !SQLError) : (boolean|void))=} |
| 602 | * opt_errorCallback |
| 603 | */ |
| 604 | SQLTransaction.prototype.executeSql = function( |
| 605 | sqlStatement, opt_queryArgs, opt_callback, opt_errorCallback) {}; |
| 606 | |
| 607 | /** |
| 608 | * @typedef {(function(!SQLTransaction, !SQLResultSet) : void)} |
| 609 | */ |
| 610 | var SQLStatementCallback; |
| 611 | |
| 612 | /** |
| 613 | * @constructor |
| 614 | */ |
| 615 | function SQLResultSet() {} |
| 616 | |
| 617 | /** |
| 618 | * @type {number} |
| 619 | */ |
| 620 | SQLResultSet.prototype.insertId; |
| 621 | |
| 622 | /** |
| 623 | * @type {number} |
| 624 | */ |
| 625 | SQLResultSet.prototype.rowsAffected; |
| 626 | |
| 627 | /** |
| 628 | * @type {SQLResultSetRowList} |
| 629 | */ |
| 630 | SQLResultSet.prototype.rows; |
| 631 | |
| 632 | /** |
| 633 | * @constructor |
| 634 | */ |
| 635 | function SQLResultSetRowList() {} |
| 636 | |
| 637 | /** |
| 638 | * @type {number} |
| 639 | */ |
| 640 | SQLResultSetRowList.prototype.length; |
| 641 | |
| 642 | /** |
| 643 | * @param {number} index |
| 644 | * @return {Object} |
| 645 | * @nosideeffects |
| 646 | */ |
| 647 | SQLResultSetRowList.prototype.item = function(index) {}; |
| 648 | |
| 649 | /** |
| 650 | * @param {string} name |
| 651 | * @param {string} version |
| 652 | * @param {string} description |
| 653 | * @param {number} size |
| 654 | * @param {(DatabaseCallback|function(Database))=} opt_callback |
| 655 | * @return {Database} |
| 656 | */ |
| 657 | function openDatabase(name, version, description, size, opt_callback) {} |
| 658 | |
| 659 | /** |
| 660 | * @param {string} name |
| 661 | * @param {string} version |
| 662 | * @param {string} description |
| 663 | * @param {number} size |
| 664 | * @param {(DatabaseCallback|function(Database))=} opt_callback |
| 665 | * @return {Database} |
| 666 | */ |
| 667 | Window.prototype.openDatabase = |
| 668 | function(name, version, description, size, opt_callback) {}; |
| 669 | |
| 670 | /** |
| 671 | * @type {boolean} |
| 672 | */ |
| 673 | HTMLImageElement.prototype.complete; |
| 674 | |
| 675 | /** |
| 676 | * @type {string} |
| 677 | * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#attr-img-crossorigin |
| 678 | */ |
| 679 | HTMLImageElement.prototype.crossOrigin; |
| 680 | |
| 681 | /** |
| 682 | * The postMessage method (as defined by HTML5 spec and implemented in FF3). |
| 683 | * @param {*} message |
| 684 | * @param {string|Array} targetOrigin The target origin in the 2-argument |
| 685 | * version of this function. WebKit seems to have implemented this |
| 686 | * function wrong in the 3-argument version so that ports is the |
| 687 | * second argument. |
| 688 | * @param {string|Array=} ports An optional array of ports or the target |
| 689 | * origin. WebKit seems to have implemented this |
| 690 | * function wrong in the 3-argument version so that targetOrigin is the |
| 691 | * third argument. |
| 692 | * @see http://dev.w3.org/html5/postmsg/#dom-window-postmessage |
| 693 | */ |
| 694 | Window.prototype.postMessage = function(message, targetOrigin, ports) {}; |
| 695 | |
| 696 | /** |
| 697 | * The postMessage method (as implemented in Opera). |
| 698 | * @param {string} message |
| 699 | */ |
| 700 | Document.prototype.postMessage = function(message) {}; |
| 701 | |
| 702 | /** |
| 703 | * Document head accessor. |
| 704 | * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#the-head-element-0 |
| 705 | * @type {HTMLHeadElement} |
| 706 | */ |
| 707 | Document.prototype.head; |
| 708 | |
| 709 | /** |
| 710 | * @see https://developer.apple.com/webapps/docs/documentation/AppleApplications/Reference/SafariJSRef/DOMApplicationCache/DOMApplicationCache.html |
| 711 | * @constructor |
| 712 | * @implements {EventTarget} |
| 713 | */ |
| 714 | function DOMApplicationCache() {} |
| 715 | |
| 716 | /** @override */ |
| 717 | DOMApplicationCache.prototype.addEventListener = function( |
| 718 | type, listener, useCapture) {}; |
| 719 | |
| 720 | /** @override */ |
| 721 | DOMApplicationCache.prototype.removeEventListener = function( |
| 722 | type, listener, useCapture) {}; |
| 723 | |
| 724 | /** @override */ |
| 725 | DOMApplicationCache.prototype.dispatchEvent = function(evt) {}; |
| 726 | |
| 727 | /** |
| 728 | * The object isn't associated with an application cache. This can occur if the |
| 729 | * update process fails and there is no previous cache to revert to, or if there |
| 730 | * is no manifest file. |
| 731 | * @type {number} |
| 732 | */ |
| 733 | DOMApplicationCache.prototype.UNCACHED = 0; |
| 734 | |
| 735 | /** |
| 736 | * The cache is idle. |
| 737 | * @type {number} |
| 738 | */ |
| 739 | DOMApplicationCache.prototype.IDLE = 1; |
| 740 | |
| 741 | /** |
| 742 | * The update has started but the resources are not downloaded yet - for |
| 743 | * example, this can happen when the manifest file is fetched. |
| 744 | * @type {number} |
| 745 | */ |
| 746 | DOMApplicationCache.prototype.CHECKING = 2; |
| 747 | |
| 748 | /** |
| 749 | * The resources are being downloaded into the cache. |
| 750 | * @type {number} |
| 751 | */ |
| 752 | DOMApplicationCache.prototype.DOWNLOADING = 3; |
| 753 | |
| 754 | /** |
| 755 | * Resources have finished downloading and the new cache is ready to be used. |
| 756 | * @type {number} |
| 757 | */ |
| 758 | DOMApplicationCache.prototype.UPDATEREADY = 4; |
| 759 | |
| 760 | /** |
| 761 | * The cache is obsolete. |
| 762 | * @type {number} |
| 763 | */ |
| 764 | DOMApplicationCache.prototype.OBSOLETE = 5; |
| 765 | |
| 766 | /** |
| 767 | * The current status of the application cache. |
| 768 | * @type {number} |
| 769 | */ |
| 770 | DOMApplicationCache.prototype.status; |
| 771 | |
| 772 | /** |
| 773 | * Sent when the update process finishes for the first time; that is, the first |
| 774 | * time an application cache is saved. |
| 775 | * @type {?function(!Event)} |
| 776 | */ |
| 777 | DOMApplicationCache.prototype.oncached; |
| 778 | |
| 779 | /** |
| 780 | * Sent when the cache update process begins. |
| 781 | * @type {?function(!Event)} |
| 782 | */ |
| 783 | DOMApplicationCache.prototype.onchecking; |
| 784 | |
| 785 | /** |
| 786 | * Sent when the update process begins downloading resources in the manifest |
| 787 | * file. |
| 788 | * @type {?function(!Event)} |
| 789 | */ |
| 790 | DOMApplicationCache.prototype.ondownloading; |
| 791 | |
| 792 | /** |
| 793 | * Sent when an error occurs. |
| 794 | * @type {?function(!Event)} |
| 795 | */ |
| 796 | DOMApplicationCache.prototype.onerror; |
| 797 | |
| 798 | /** |
| 799 | * Sent when the update process finishes but the manifest file does not change. |
| 800 | * @type {?function(!Event)} |
| 801 | */ |
| 802 | DOMApplicationCache.prototype.onnoupdate; |
| 803 | |
| 804 | /** |
| 805 | * Sent when each resource in the manifest file begins to download. |
| 806 | * @type {?function(!Event)} |
| 807 | */ |
| 808 | DOMApplicationCache.prototype.onprogress; |
| 809 | |
| 810 | /** |
| 811 | * Sent when there is an existing application cache, the update process |
| 812 | * finishes, and there is a new application cache ready for use. |
| 813 | * @type {?function(!Event)} |
| 814 | */ |
| 815 | DOMApplicationCache.prototype.onupdateready; |
| 816 | |
| 817 | /** |
| 818 | * Replaces the active cache with the latest version. |
| 819 | * @throws {DOMException} |
| 820 | */ |
| 821 | DOMApplicationCache.prototype.swapCache = function() {}; |
| 822 | |
| 823 | /** |
| 824 | * Manually triggers the update process. |
| 825 | * @throws {DOMException} |
| 826 | */ |
| 827 | DOMApplicationCache.prototype.update = function() {}; |
| 828 | |
| 829 | /** @type {DOMApplicationCache} */ |
| 830 | var applicationCache; |
| 831 | |
| 832 | /** @type {DOMApplicationCache} */ |
| 833 | Window.prototype.applicationCache; |
| 834 | |
| 835 | /** |
| 836 | * @see https://developer.mozilla.org/En/DOM/Worker/Functions_available_to_workers |
| 837 | * @param {...string} var_args |
| 838 | */ |
| 839 | Window.prototype.importScripts = function(var_args) {}; |
| 840 | |
| 841 | /** |
| 842 | * @see https://developer.mozilla.org/En/DOM/Worker/Functions_available_to_workers |
| 843 | * @param {...string} var_args |
| 844 | */ |
| 845 | var importScripts = function(var_args) {}; |
| 846 | |
| 847 | /** |
| 848 | * @see http://dev.w3.org/html5/postmsg/ |
| 849 | * @interface |
| 850 | */ |
| 851 | function Transferable() {} |
| 852 | |
| 853 | /** |
| 854 | * @see http://dev.w3.org/html5/workers/ |
| 855 | * @constructor |
| 856 | * @implements {EventTarget} |
| 857 | */ |
| 858 | function WebWorker() {} |
| 859 | |
| 860 | /** @override */ |
| 861 | WebWorker.prototype.addEventListener = function( |
| 862 | type, listener, useCapture) {}; |
| 863 | |
| 864 | /** @override */ |
| 865 | WebWorker.prototype.removeEventListener = function( |
| 866 | type, listener, useCapture) {}; |
| 867 | |
| 868 | /** @override */ |
| 869 | WebWorker.prototype.dispatchEvent = function(evt) {}; |
| 870 | |
| 871 | /** |
| 872 | * Stops the worker process |
| 873 | */ |
| 874 | WebWorker.prototype.terminate = function() {}; |
| 875 | |
| 876 | /** |
| 877 | * Posts a message to the worker thread. |
| 878 | * @param {string} message |
| 879 | */ |
| 880 | WebWorker.prototype.postMessage = function(message) {}; |
| 881 | |
| 882 | /** |
| 883 | * Sent when the worker thread posts a message to its creator. |
| 884 | * @type {?function(!MessageEvent)} |
| 885 | */ |
| 886 | WebWorker.prototype.onmessage; |
| 887 | |
| 888 | /** |
| 889 | * Sent when the worker thread encounters an error. |
| 890 | * @type {?function(!Event)} |
| 891 | */ |
| 892 | WebWorker.prototype.onerror; |
| 893 | |
| 894 | /** |
| 895 | * @see http://dev.w3.org/html5/workers/ |
| 896 | * @constructor |
| 897 | * @implements {EventTarget} |
| 898 | */ |
| 899 | function Worker(opt_arg0) {} |
| 900 | |
| 901 | /** @override */ |
| 902 | Worker.prototype.addEventListener = function( |
| 903 | type, listener, useCapture) {}; |
| 904 | |
| 905 | /** @override */ |
| 906 | Worker.prototype.removeEventListener = function( |
| 907 | type, listener, useCapture) {}; |
| 908 | |
| 909 | /** @override */ |
| 910 | Worker.prototype.dispatchEvent = function(evt) {}; |
| 911 | |
| 912 | /** |
| 913 | * Stops the worker process |
| 914 | */ |
| 915 | Worker.prototype.terminate = function() {}; |
| 916 | |
| 917 | /** |
| 918 | * Posts a message to the worker thread. |
| 919 | * @param {*} message |
| 920 | * @param {Array.<Transferable>=} opt_transfer |
| 921 | */ |
| 922 | Worker.prototype.postMessage = function(message, opt_transfer) {}; |
| 923 | |
| 924 | /** |
| 925 | * Posts a message to the worker thread. |
| 926 | * @param {*} message |
| 927 | * @param {Array.<Transferable>=} opt_transfer |
| 928 | */ |
| 929 | Worker.prototype.webkitPostMessage = function(message, opt_transfer) {}; |
| 930 | |
| 931 | /** |
| 932 | * Sent when the worker thread posts a message to its creator. |
| 933 | * @type {?function(!MessageEvent)} |
| 934 | */ |
| 935 | Worker.prototype.onmessage = function() {}; |
| 936 | |
| 937 | /** |
| 938 | * Sent when the worker thread encounters an error. |
| 939 | * @type {?function(!Event)} |
| 940 | */ |
| 941 | Worker.prototype.onerror = function() {}; |
| 942 | |
| 943 | /** |
| 944 | * @see http://dev.w3.org/html5/workers/ |
| 945 | * @param {string} scriptURL The URL of the script to run in the SharedWorker. |
| 946 | * @param {string=} opt_name A name that can later be used to obtain a |
| 947 | * reference to the same SharedWorker. |
| 948 | * @constructor |
| 949 | * @implements {EventTarget} |
| 950 | */ |
| 951 | function SharedWorker(scriptURL, opt_name) {} |
| 952 | |
| 953 | /** @override */ |
| 954 | SharedWorker.prototype.addEventListener = function( |
| 955 | type, listener, useCapture) {}; |
| 956 | |
| 957 | /** @override */ |
| 958 | SharedWorker.prototype.removeEventListener = function( |
| 959 | type, listener, useCapture) {}; |
| 960 | |
| 961 | /** @override */ |
| 962 | SharedWorker.prototype.dispatchEvent = function(evt) {}; |
| 963 | |
| 964 | /** |
| 965 | * @type {!MessagePort} |
| 966 | */ |
| 967 | SharedWorker.prototype.port; |
| 968 | |
| 969 | /** |
| 970 | * Called on network errors for loading the initial script. |
| 971 | * @type {?function(!Event)} |
| 972 | */ |
| 973 | SharedWorker.prototype.onerror = function() {}; |
| 974 | |
| 975 | /** |
| 976 | * @see http://dev.w3.org/html5/workers/ |
| 977 | * @interface |
| 978 | */ |
| 979 | function WorkerLocation() {} |
| 980 | |
| 981 | /** @type {string} */ |
| 982 | WorkerLocation.prototype.protocol; |
| 983 | |
| 984 | /** @type {string} */ |
| 985 | WorkerLocation.prototype.host; |
| 986 | |
| 987 | /** @type {string} */ |
| 988 | WorkerLocation.prototype.hostname; |
| 989 | |
| 990 | /** @type {string} */ |
| 991 | WorkerLocation.prototype.port; |
| 992 | |
| 993 | /** @type {string} */ |
| 994 | WorkerLocation.prototype.pathname; |
| 995 | |
| 996 | /** @type {string} */ |
| 997 | WorkerLocation.prototype.search; |
| 998 | |
| 999 | /** @type {string} */ |
| 1000 | WorkerLocation.prototype.hash; |
| 1001 | |
| 1002 | /** |
| 1003 | * @see http://dev.w3.org/html5/workers/ |
| 1004 | * @interface |
| 1005 | * @extends {EventTarget} |
| 1006 | */ |
| 1007 | function WorkerGlobalScope() {} |
| 1008 | |
| 1009 | /** @type {WorkerGlobalScope} */ |
| 1010 | WorkerGlobalScope.prototype.self; |
| 1011 | |
| 1012 | /** @type {WorkerLocation} */ |
| 1013 | WorkerGlobalScope.prototype.location; |
| 1014 | |
| 1015 | /** |
| 1016 | * Closes the worker represented by this WorkerGlobalScope. |
| 1017 | */ |
| 1018 | WorkerGlobalScope.prototype.close = function() {}; |
| 1019 | |
| 1020 | /** |
| 1021 | * Sent when the worker encounters an error. |
| 1022 | * @type {?function(!Event)} |
| 1023 | */ |
| 1024 | WorkerGlobalScope.prototype.onerror; |
| 1025 | |
| 1026 | /** |
| 1027 | * Sent when the worker goes offline. |
| 1028 | * @type {?function(!Event)} |
| 1029 | */ |
| 1030 | WorkerGlobalScope.prototype.onoffline; |
| 1031 | |
| 1032 | /** |
| 1033 | * Sent when the worker goes online. |
| 1034 | * @type {?function(!Event)} |
| 1035 | */ |
| 1036 | WorkerGlobalScope.prototype.ononline; |
| 1037 | |
| 1038 | /** |
| 1039 | * @see http://dev.w3.org/html5/workers/ |
| 1040 | * @interface |
| 1041 | * @extends {WorkerGlobalScope} |
| 1042 | */ |
| 1043 | function DedicatedWorkerGlobalScope() {} |
| 1044 | |
| 1045 | /** |
| 1046 | * Posts a message to creator of this worker. |
| 1047 | * @param {*} message |
| 1048 | * @param {Array.<Transferable>=} opt_transfer |
| 1049 | */ |
| 1050 | DedicatedWorkerGlobalScope.prototype.postMessage = |
| 1051 | function(message, opt_transfer) {}; |
| 1052 | |
| 1053 | /** |
| 1054 | * Posts a message to creator of this worker. |
| 1055 | * @param {*} message |
| 1056 | * @param {Array.<Transferable>=} opt_transfer |
| 1057 | */ |
| 1058 | DedicatedWorkerGlobalScope.prototype.webkitPostMessage = |
| 1059 | function(message, opt_transfer) {}; |
| 1060 | |
| 1061 | /** |
| 1062 | * Sent when the creator posts a message to this worker. |
| 1063 | * @type {?function(!MessageEvent)} |
| 1064 | */ |
| 1065 | DedicatedWorkerGlobalScope.prototype.onmessage = function() {}; |
| 1066 | |
| 1067 | /** |
| 1068 | * @see http://dev.w3.org/html5/workers/ |
| 1069 | * @interface |
| 1070 | * @extends {WorkerGlobalScope} |
| 1071 | */ |
| 1072 | function SharedWorkerGlobalScope() {} |
| 1073 | |
| 1074 | /** @type {string} */ |
| 1075 | SharedWorkerGlobalScope.prototype.name; |
| 1076 | |
| 1077 | /** |
| 1078 | * Sent when a connection to this worker is opened. |
| 1079 | * @type {?function(!Event)} |
| 1080 | */ |
| 1081 | SharedWorkerGlobalScope.prototype.onconnect = function() {}; |
| 1082 | |
| 1083 | /** @type {Element} */ |
| 1084 | HTMLElement.prototype.contextMenu; |
| 1085 | |
| 1086 | /** @type {boolean} */ |
| 1087 | HTMLElement.prototype.draggable; |
| 1088 | |
| 1089 | /** |
| 1090 | * This is actually a DOMSettableTokenList property. However since that |
| 1091 | * interface isn't currently defined and no known browsers implement this |
| 1092 | * feature, just define the property for now. |
| 1093 | * |
| 1094 | * @const |
| 1095 | * @type {Object} |
| 1096 | */ |
| 1097 | HTMLElement.prototype.dropzone; |
| 1098 | |
| 1099 | /** |
| 1100 | * @see http://www.w3.org/TR/html5/dom.html#dom-getelementsbyclassname |
| 1101 | * @param {string} classNames |
| 1102 | * @return {!NodeList} |
| 1103 | * @nosideeffects |
| 1104 | */ |
| 1105 | HTMLElement.prototype.getElementsByClassName = function(classNames) {}; |
| 1106 | // NOTE: Document.prototype.getElementsByClassName is in gecko_dom.js |
| 1107 | |
| 1108 | /** @type {boolean} */ |
| 1109 | HTMLElement.prototype.hidden; |
| 1110 | |
| 1111 | /** @type {boolean} */ |
| 1112 | HTMLElement.prototype.spellcheck; |
| 1113 | |
| 1114 | /** @type {string} */ |
| 1115 | HTMLAnchorElement.prototype.hash; |
| 1116 | |
| 1117 | /** @type {string} */ |
| 1118 | HTMLAnchorElement.prototype.host; |
| 1119 | |
| 1120 | /** @type {string} */ |
| 1121 | HTMLAnchorElement.prototype.hostname; |
| 1122 | |
| 1123 | /** @type {string} */ |
| 1124 | HTMLAnchorElement.prototype.pathname; |
| 1125 | |
| 1126 | /** @type {string} */ |
| 1127 | HTMLAnchorElement.prototype.port; |
| 1128 | |
| 1129 | /** @type {string} */ |
| 1130 | HTMLAnchorElement.prototype.protocol; |
| 1131 | |
| 1132 | /** @type {string} */ |
| 1133 | HTMLAnchorElement.prototype.search; |
| 1134 | |
| 1135 | /** @type {string} */ |
| 1136 | HTMLInputElement.prototype.autocomplete; |
| 1137 | |
| 1138 | /** @type {string} */ |
| 1139 | HTMLInputElement.prototype.dirname; |
| 1140 | |
| 1141 | /** @type {FileList} */ |
| 1142 | HTMLInputElement.prototype.files; |
| 1143 | |
| 1144 | /** @type {string} */ |
| 1145 | HTMLInputElement.prototype.list; |
| 1146 | |
| 1147 | /** @type {string} */ |
| 1148 | HTMLInputElement.prototype.max; |
| 1149 | |
| 1150 | /** @type {string} */ |
| 1151 | HTMLInputElement.prototype.min; |
| 1152 | |
| 1153 | /** @type {string} */ |
| 1154 | HTMLInputElement.prototype.pattern; |
| 1155 | |
| 1156 | /** @type {boolean} */ |
| 1157 | HTMLInputElement.prototype.multiple; |
| 1158 | |
| 1159 | /** @type {string} */ |
| 1160 | HTMLInputElement.prototype.placeholder; |
| 1161 | |
| 1162 | /** @type {boolean} */ |
| 1163 | HTMLInputElement.prototype.required; |
| 1164 | |
| 1165 | /** @type {string} */ |
| 1166 | HTMLInputElement.prototype.step; |
| 1167 | |
| 1168 | |
| 1169 | /** |
| 1170 | * @constructor |
| 1171 | * @extends {HTMLElement} |
| 1172 | */ |
| 1173 | function HTMLMediaElement() {} |
| 1174 | |
| 1175 | /** @type {MediaError} */ |
| 1176 | HTMLMediaElement.prototype.error; |
| 1177 | |
| 1178 | /** @type {string} */ |
| 1179 | HTMLMediaElement.prototype.src; |
| 1180 | |
| 1181 | /** @type {string} */ |
| 1182 | HTMLMediaElement.prototype.currentSrc; |
| 1183 | |
| 1184 | /** @type {number} */ |
| 1185 | HTMLMediaElement.prototype.networkState; |
| 1186 | |
| 1187 | /** @type {boolean} */ |
| 1188 | HTMLMediaElement.prototype.autobuffer; |
| 1189 | |
| 1190 | /** @type {TimeRanges} */ |
| 1191 | HTMLMediaElement.prototype.buffered; |
| 1192 | |
| 1193 | /** |
| 1194 | * Loads the media element. |
| 1195 | */ |
| 1196 | HTMLMediaElement.prototype.load = function() {}; |
| 1197 | |
| 1198 | /** |
| 1199 | * @param {string} type Type of the element in question in question. |
| 1200 | * @return {string} Whether it can play the type. |
| 1201 | * @nosideeffects |
| 1202 | */ |
| 1203 | HTMLMediaElement.prototype.canPlayType = function(type) {}; |
| 1204 | |
| 1205 | /** @type {number} */ |
| 1206 | HTMLMediaElement.prototype.readyState; |
| 1207 | |
| 1208 | /** @type {boolean} */ |
| 1209 | HTMLMediaElement.prototype.seeking; |
| 1210 | |
| 1211 | /** @type {number} */ |
| 1212 | HTMLMediaElement.prototype.currentTime; |
| 1213 | |
| 1214 | /** @type {number} */ |
| 1215 | HTMLMediaElement.prototype.startTime; |
| 1216 | |
| 1217 | /** @type {number} */ |
| 1218 | HTMLMediaElement.prototype.duration; |
| 1219 | |
| 1220 | /** @type {boolean} */ |
| 1221 | HTMLMediaElement.prototype.paused; |
| 1222 | |
| 1223 | /** @type {number} */ |
| 1224 | HTMLMediaElement.prototype.defaultPlaybackRate; |
| 1225 | |
| 1226 | /** @type {number} */ |
| 1227 | HTMLMediaElement.prototype.playbackRate; |
| 1228 | |
| 1229 | /** @type {TimeRanges} */ |
| 1230 | HTMLMediaElement.prototype.played; |
| 1231 | |
| 1232 | /** @type {TimeRanges} */ |
| 1233 | HTMLMediaElement.prototype.seekable; |
| 1234 | |
| 1235 | /** @type {boolean} */ |
| 1236 | HTMLMediaElement.prototype.ended; |
| 1237 | |
| 1238 | /** @type {boolean} */ |
| 1239 | HTMLMediaElement.prototype.autoplay; |
| 1240 | |
| 1241 | /** @type {boolean} */ |
| 1242 | HTMLMediaElement.prototype.loop; |
| 1243 | |
| 1244 | /** |
| 1245 | * Starts playing the media. |
| 1246 | */ |
| 1247 | HTMLMediaElement.prototype.play = function() {}; |
| 1248 | |
| 1249 | /** |
| 1250 | * Pauses the media. |
| 1251 | */ |
| 1252 | HTMLMediaElement.prototype.pause = function() {}; |
| 1253 | |
| 1254 | /** @type {boolean} */ |
| 1255 | HTMLMediaElement.prototype.controls; |
| 1256 | |
| 1257 | /** @type {number} */ |
| 1258 | HTMLMediaElement.prototype.volume; |
| 1259 | |
| 1260 | /** @type {boolean} */ |
| 1261 | HTMLMediaElement.prototype.muted; |
| 1262 | |
| 1263 | /** |
| 1264 | * @constructor |
| 1265 | * @extends {HTMLMediaElement} |
| 1266 | */ |
| 1267 | function HTMLAudioElement() {} |
| 1268 | |
| 1269 | /** |
| 1270 | * @constructor |
| 1271 | * @extends {HTMLMediaElement} |
| 1272 | */ |
| 1273 | function HTMLVideoElement() {} |
| 1274 | |
| 1275 | /** |
| 1276 | * Starts displaying the video in full screen mode. |
| 1277 | */ |
| 1278 | HTMLVideoElement.prototype.webkitEnterFullscreen = function() {}; |
| 1279 | |
| 1280 | /** |
| 1281 | * Starts displaying the video in full screen mode. |
| 1282 | */ |
| 1283 | HTMLVideoElement.prototype.webkitEnterFullScreen = function() {}; |
| 1284 | |
| 1285 | /** |
| 1286 | * Stops displaying the video in full screen mode. |
| 1287 | */ |
| 1288 | HTMLVideoElement.prototype.webkitExitFullscreen = function() {}; |
| 1289 | |
| 1290 | /** |
| 1291 | * Stops displaying the video in full screen mode. |
| 1292 | */ |
| 1293 | HTMLVideoElement.prototype.webkitExitFullScreen = function() {}; |
| 1294 | |
| 1295 | /** @type {string} */ |
| 1296 | HTMLVideoElement.prototype.width; |
| 1297 | |
| 1298 | /** @type {string} */ |
| 1299 | HTMLVideoElement.prototype.height; |
| 1300 | |
| 1301 | /** @type {number} */ |
| 1302 | HTMLVideoElement.prototype.videoWidth; |
| 1303 | |
| 1304 | /** @type {number} */ |
| 1305 | HTMLVideoElement.prototype.videoHeight; |
| 1306 | |
| 1307 | /** @type {string} */ |
| 1308 | HTMLVideoElement.prototype.poster; |
| 1309 | |
| 1310 | /** @type {boolean} */ |
| 1311 | HTMLVideoElement.prototype.webkitSupportsFullscreen; |
| 1312 | |
| 1313 | /** @type {boolean} */ |
| 1314 | HTMLVideoElement.prototype.webkitDisplayingFullscreen; |
| 1315 | |
| 1316 | /** |
| 1317 | * @constructor |
| 1318 | */ |
| 1319 | function MediaError() {} |
| 1320 | |
| 1321 | /** @type {number} */ |
| 1322 | MediaError.prototype.code; |
| 1323 | |
| 1324 | // HTML5 MessageChannel |
| 1325 | /** |
| 1326 | * @see http://dev.w3.org/html5/spec/comms.html#messagechannel |
| 1327 | * @constructor |
| 1328 | */ |
| 1329 | function MessageChannel() {} |
| 1330 | |
| 1331 | /** |
| 1332 | * Returns the first port. |
| 1333 | * @type {!MessagePort} |
| 1334 | */ |
| 1335 | MessageChannel.prototype.port1; |
| 1336 | |
| 1337 | /** |
| 1338 | * Returns the second port. |
| 1339 | * @type {!MessagePort} |
| 1340 | */ |
| 1341 | MessageChannel.prototype.port2; |
| 1342 | |
| 1343 | // HTML5 MessagePort |
| 1344 | /** |
| 1345 | * @see http://dev.w3.org/html5/spec/comms.html#messageport |
| 1346 | * @constructor |
| 1347 | * @implements {EventTarget} |
| 1348 | * @implements {Transferable} |
| 1349 | */ |
| 1350 | function MessagePort() {} |
| 1351 | |
| 1352 | /** @override */ |
| 1353 | MessagePort.prototype.addEventListener = function( |
| 1354 | type, listener, useCapture) {}; |
| 1355 | |
| 1356 | /** @override */ |
| 1357 | MessagePort.prototype.removeEventListener = function( |
| 1358 | type, listener, useCapture) {}; |
| 1359 | |
| 1360 | /** @override */ |
| 1361 | MessagePort.prototype.dispatchEvent = function(evt) {}; |
| 1362 | |
| 1363 | |
| 1364 | /** |
| 1365 | * Posts a message through the channel, optionally with the given |
| 1366 | * Array of Transferables. |
| 1367 | * @param {*} message |
| 1368 | * @param {Array.<Transferable>=} opt_transfer |
| 1369 | */ |
| 1370 | MessagePort.prototype.postMessage = function(message, opt_transfer) { |
| 1371 | }; |
| 1372 | |
| 1373 | /** |
| 1374 | * Begins dispatching messages received on the port. |
| 1375 | */ |
| 1376 | MessagePort.prototype.start = function() {}; |
| 1377 | |
| 1378 | /** |
| 1379 | * Disconnects the port, so that it is no longer active. |
| 1380 | */ |
| 1381 | MessagePort.prototype.close = function() {}; |
| 1382 | |
| 1383 | /** |
| 1384 | * @type {?function(!MessageEvent)} |
| 1385 | */ |
| 1386 | MessagePort.prototype.onmessage; |
| 1387 | |
| 1388 | // HTML5 MessageEvent class |
| 1389 | /** |
| 1390 | * @see http://dev.w3.org/html5/spec/comms.html#messageevent |
| 1391 | * @constructor |
| 1392 | * @extends {Event} |
| 1393 | */ |
| 1394 | function MessageEvent() {} |
| 1395 | |
| 1396 | /** |
| 1397 | * Returns the data of the message. |
| 1398 | * @type {*} |
| 1399 | */ |
| 1400 | MessageEvent.prototype.data; |
| 1401 | |
| 1402 | /** |
| 1403 | * Returns the origin of the message, for server-sent events and cross-document |
| 1404 | * messaging. |
| 1405 | * @type {string} |
| 1406 | */ |
| 1407 | MessageEvent.prototype.origin; |
| 1408 | |
| 1409 | /** |
| 1410 | * Returns the last event ID, for server-sent events. |
| 1411 | * @type {string} |
| 1412 | */ |
| 1413 | MessageEvent.prototype.lastEventId; |
| 1414 | |
| 1415 | /** |
| 1416 | * Returns the last event ID, for server-sent events. |
| 1417 | * @type {Window} |
| 1418 | */ |
| 1419 | MessageEvent.prototype.source; |
| 1420 | |
| 1421 | /** |
| 1422 | * Returns the Array of MessagePorts sent with the message, for cross-document |
| 1423 | * messaging and channel messaging. |
| 1424 | * @type {Array.<MessagePort>} |
| 1425 | */ |
| 1426 | MessageEvent.prototype.ports; |
| 1427 | |
| 1428 | /** |
| 1429 | * Initializes the event in a manner analogous to the similarly-named methods in |
| 1430 | * the DOM Events interfaces. |
| 1431 | * @param {string} typeArg |
| 1432 | * @param {boolean} canBubbleArg |
| 1433 | * @param {boolean} cancelableArg |
| 1434 | * @param {*} dataArg |
| 1435 | * @param {string} originArg |
| 1436 | * @param {string} lastEventIdArg |
| 1437 | * @param {Window} sourceArg |
| 1438 | * @param {Array.<MessagePort>} portsArg |
| 1439 | * @override |
| 1440 | */ |
| 1441 | MessageEvent.prototype.initMessageEvent = function(typeArg, canBubbleArg, |
| 1442 | cancelableArg, dataArg, originArg, lastEventIdArg, sourceArg, portsArg) {}; |
| 1443 | |
| 1444 | /** |
| 1445 | * Initializes the event in a manner analogous to the similarly-named methods in |
| 1446 | * the DOM Events interfaces. |
| 1447 | * @param {string} namespaceURI |
| 1448 | * @param {string} typeArg |
| 1449 | * @param {boolean} canBubbleArg |
| 1450 | * @param {boolean} cancelableArg |
| 1451 | * @param {*} dataArg |
| 1452 | * @param {string} originArg |
| 1453 | * @param {string} lastEventIdArg |
| 1454 | * @param {Window} sourceArg |
| 1455 | * @param {Array.<MessagePort>} portsArg |
| 1456 | */ |
| 1457 | MessageEvent.prototype.initMessageEventNS = function(namespaceURI, typeArg, |
| 1458 | canBubbleArg, cancelableArg, dataArg, originArg, lastEventIdArg, sourceArg, |
| 1459 | portsArg) {}; |
| 1460 | |
| 1461 | /** |
| 1462 | * HTML5 DataTransfer class |
| 1463 | * @see http://dev.w3.org/html5/spec/dnd.html#the-dragevent-and-datatransfer-interfaces |
| 1464 | * @constructor |
| 1465 | */ |
| 1466 | function DataTransfer() {} |
| 1467 | |
| 1468 | /** @type {string} */ |
| 1469 | DataTransfer.prototype.dropEffect; |
| 1470 | |
| 1471 | /** @type {string} */ |
| 1472 | DataTransfer.prototype.effectAllowed; |
| 1473 | |
| 1474 | /** @type {Array.<string>} */ |
| 1475 | DataTransfer.prototype.types; |
| 1476 | |
| 1477 | /** @type {FileList} */ |
| 1478 | DataTransfer.prototype.files; |
| 1479 | |
| 1480 | /** |
| 1481 | * @param {string=} opt_format Format for which to remove data. |
| 1482 | */ |
| 1483 | DataTransfer.prototype.clearData = function(opt_format) {}; |
| 1484 | |
| 1485 | /** |
| 1486 | * @param {string} format Format for which to set data. |
| 1487 | * @param {string} data Data to add. |
| 1488 | */ |
| 1489 | DataTransfer.prototype.setData = function(format, data) {}; |
| 1490 | |
| 1491 | /** |
| 1492 | * @param {string} format Format for which to set data. |
| 1493 | * @return {string} Data for the given format. |
| 1494 | */ |
| 1495 | DataTransfer.prototype.getData = function(format) { return ''; }; |
| 1496 | |
| 1497 | /** |
| 1498 | * @param {HTMLElement} img The image to use when dragging. |
| 1499 | * @param {number} x Horizontal position of the cursor. |
| 1500 | * @param {number} y Vertical position of the cursor. |
| 1501 | */ |
| 1502 | DataTransfer.prototype.setDragImage = function(img, x, y) {}; |
| 1503 | |
| 1504 | /** |
| 1505 | * @param {HTMLElement} elem Element to receive drag result events. |
| 1506 | */ |
| 1507 | DataTransfer.prototype.addElement = function(elem) {}; |
| 1508 | |
| 1509 | /** |
| 1510 | * Addition for accessing clipboard file data that are part of the proposed |
| 1511 | * HTML5 spec. |
| 1512 | * @type {DataTransfer} |
| 1513 | */ |
| 1514 | MouseEvent.prototype.dataTransfer; |
| 1515 | |
| 1516 | |
| 1517 | /** |
| 1518 | * @constructor |
| 1519 | * @extends {Event} |
| 1520 | */ |
| 1521 | function ProgressEvent() {} |
| 1522 | |
| 1523 | /** @type {number} */ |
| 1524 | ProgressEvent.prototype.total; |
| 1525 | |
| 1526 | /** @type {number} */ |
| 1527 | ProgressEvent.prototype.loaded; |
| 1528 | |
| 1529 | /** @type {boolean} */ |
| 1530 | ProgressEvent.prototype.lengthComputable; |
| 1531 | |
| 1532 | |
| 1533 | /** |
| 1534 | * @constructor |
| 1535 | */ |
| 1536 | function TimeRanges() {} |
| 1537 | |
| 1538 | /** @type {number} */ |
| 1539 | TimeRanges.prototype.length; |
| 1540 | |
| 1541 | /** |
| 1542 | * @param {number} index The index. |
| 1543 | * @return {number} The start time of the range at index. |
| 1544 | * @throws {DOMException} |
| 1545 | */ |
| 1546 | TimeRanges.prototype.start = function(index) { return 0; }; |
| 1547 | |
| 1548 | /** |
| 1549 | * @param {number} index The index. |
| 1550 | * @return {number} The end time of the range at index. |
| 1551 | * @throws {DOMException} |
| 1552 | */ |
| 1553 | TimeRanges.prototype.end = function(index) { return 0; }; |
| 1554 | |
| 1555 | |
| 1556 | // HTML5 Web Socket class |
| 1557 | /** |
| 1558 | * @see http://dev.w3.org/html5/websockets/ |
| 1559 | * @constructor |
| 1560 | * @param {string} url |
| 1561 | * @param {string=} opt_protocol |
| 1562 | * @implements {EventTarget} |
| 1563 | */ |
| 1564 | function WebSocket(url, opt_protocol) {} |
| 1565 | |
| 1566 | /** @override */ |
| 1567 | WebSocket.prototype.addEventListener = function( |
| 1568 | type, listener, useCapture) {}; |
| 1569 | |
| 1570 | /** @override */ |
| 1571 | WebSocket.prototype.removeEventListener = function( |
| 1572 | type, listener, useCapture) {}; |
| 1573 | |
| 1574 | /** @override */ |
| 1575 | WebSocket.prototype.dispatchEvent = function(evt) {}; |
| 1576 | |
| 1577 | /** |
| 1578 | * Returns the URL value that was passed to the constructor. |
| 1579 | * @type {string} |
| 1580 | */ |
| 1581 | WebSocket.prototype.URL; |
| 1582 | |
| 1583 | /** |
| 1584 | * The connection has not yet been established. |
| 1585 | * @type {number} |
| 1586 | */ |
| 1587 | WebSocket.prototype.CONNECTING = 0; |
| 1588 | |
| 1589 | /** |
| 1590 | * The Web Socket connection is established and communication is possible. |
| 1591 | * @type {number} |
| 1592 | */ |
| 1593 | WebSocket.prototype.OPEN = 1; |
| 1594 | |
| 1595 | /** |
| 1596 | * The connection has been closed or could not be opened. |
| 1597 | * @type {number} |
| 1598 | */ |
| 1599 | WebSocket.prototype.CLOSED = 2; |
| 1600 | |
| 1601 | /** |
| 1602 | * Represents the state of the connection. |
| 1603 | * @type {number} |
| 1604 | */ |
| 1605 | WebSocket.prototype.readyState; |
| 1606 | |
| 1607 | /** |
| 1608 | * Returns the number of bytes that have been queued but not yet sent. |
| 1609 | * @type {number} |
| 1610 | */ |
| 1611 | WebSocket.prototype.bufferedAmount; |
| 1612 | |
| 1613 | /** |
| 1614 | * An event handler called on open event. |
| 1615 | * @type {?function(!Event)} |
| 1616 | */ |
| 1617 | WebSocket.prototype.onopen; |
| 1618 | |
| 1619 | /** |
| 1620 | * An event handler called on message event. |
| 1621 | * @type {?function(!MessageEvent)} |
| 1622 | */ |
| 1623 | WebSocket.prototype.onmessage; |
| 1624 | |
| 1625 | /** |
| 1626 | * An event handler called on close event. |
| 1627 | * @type {?function(!Event)} |
| 1628 | */ |
| 1629 | WebSocket.prototype.onclose; |
| 1630 | |
| 1631 | /** |
| 1632 | * Transmits data using the connection. |
| 1633 | * @param {string|ArrayBuffer} data |
| 1634 | * @return {boolean} |
| 1635 | */ |
| 1636 | WebSocket.prototype.send = function(data) {}; |
| 1637 | |
| 1638 | /** |
| 1639 | * Closes the Web Socket connection or connection attempt, if any. |
| 1640 | */ |
| 1641 | WebSocket.prototype.close = function() {}; |
| 1642 | |
| 1643 | /** |
| 1644 | * @type {string} Sets the type of data (blob or arraybuffer) for binary data. |
| 1645 | */ |
| 1646 | WebSocket.prototype.binaryType; |
| 1647 | |
| 1648 | // HTML5 History |
| 1649 | /** |
| 1650 | * Pushes a new state into the session history. |
| 1651 | * @see http://www.w3.org/TR/html5/history.html#the-history-interface |
| 1652 | * @param {*} data New state. |
| 1653 | * @param {string} title The title for a new session history entry. |
| 1654 | * @param {string=} opt_url The URL for a new session history entry. |
| 1655 | */ |
| 1656 | History.prototype.pushState = function(data, title, opt_url) {}; |
| 1657 | |
| 1658 | /** |
| 1659 | * Replaces the current state in the session history. |
| 1660 | * @see http://www.w3.org/TR/html5/history.html#the-history-interface |
| 1661 | * @param {*} data New state. |
| 1662 | * @param {string} title The title for a session history entry. |
| 1663 | * @param {string=} opt_url The URL for a new session history entry. |
| 1664 | */ |
| 1665 | History.prototype.replaceState = function(data, title, opt_url) {}; |
| 1666 | |
| 1667 | /** |
| 1668 | * @see http://www.w3.org/TR/html5/history.html#event-definitions |
| 1669 | * @constructor |
| 1670 | * @extends {Event} |
| 1671 | */ |
| 1672 | function PopStateEvent() {} |
| 1673 | |
| 1674 | /** |
| 1675 | * @type {*} |
| 1676 | */ |
| 1677 | PopStateEvent.prototype.state; |
| 1678 | |
| 1679 | /** |
| 1680 | * Initializes the event after it has been created with document.createEvent |
| 1681 | * @param {string} typeArg |
| 1682 | * @param {boolean} canBubbleArg |
| 1683 | * @param {boolean} cancelableArg |
| 1684 | * @param {*} stateArg |
| 1685 | */ |
| 1686 | PopStateEvent.prototype.initPopStateEvent = function(typeArg, canBubbleArg, |
| 1687 | cancelableArg, stateArg) {}; |
| 1688 | |
| 1689 | /** |
| 1690 | * @see http://www.w3.org/TR/html5/history.html#event-definitions |
| 1691 | * @constructor |
| 1692 | * @extends {Event} |
| 1693 | */ |
| 1694 | function HashChangeEvent() {} |
| 1695 | |
| 1696 | /** @type {string} */ |
| 1697 | HashChangeEvent.prototype.oldURL; |
| 1698 | |
| 1699 | /** @type {string} */ |
| 1700 | HashChangeEvent.prototype.newURL; |
| 1701 | |
| 1702 | /** |
| 1703 | * Initializes the event after it has been created with document.createEvent |
| 1704 | * @param {string} typeArg |
| 1705 | * @param {boolean} canBubbleArg |
| 1706 | * @param {boolean} cancelableArg |
| 1707 | * @param {string} oldURLArg |
| 1708 | * @param {string} newURLArg |
| 1709 | */ |
| 1710 | HashChangeEvent.prototype.initHashChangeEvent = function(typeArg, canBubbleArg, |
| 1711 | cancelableArg, oldURLArg, newURLArg) {}; |
| 1712 | |
| 1713 | /** |
| 1714 | * @see http://www.w3.org/TR/html5/history.html#event-definitions |
| 1715 | * @constructor |
| 1716 | * @extends {Event} |
| 1717 | */ |
| 1718 | function PageTransitionEvent() {} |
| 1719 | |
| 1720 | /** @type {boolean} */ |
| 1721 | PageTransitionEvent.prototype.persisted; |
| 1722 | |
| 1723 | /** |
| 1724 | * Initializes the event after it has been created with document.createEvent |
| 1725 | * @param {string} typeArg |
| 1726 | * @param {boolean} canBubbleArg |
| 1727 | * @param {boolean} cancelableArg |
| 1728 | * @param {*} persistedArg |
| 1729 | */ |
| 1730 | PageTransitionEvent.prototype.initPageTransitionEvent = function(typeArg, |
| 1731 | canBubbleArg, cancelableArg, persistedArg) {}; |
| 1732 | |
| 1733 | /** |
| 1734 | * @constructor |
| 1735 | */ |
| 1736 | function FileList() {} |
| 1737 | |
| 1738 | /** @type {number} */ |
| 1739 | FileList.prototype.length; |
| 1740 | |
| 1741 | /** |
| 1742 | * @param {number} i File to return from the list. |
| 1743 | * @return {File} The ith file in the list. |
| 1744 | * @nosideeffects |
| 1745 | */ |
| 1746 | FileList.prototype.item = function(i) { return null; }; |
| 1747 | |
| 1748 | /** |
| 1749 | * @type {boolean} |
| 1750 | * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#withcredentials |
| 1751 | */ |
| 1752 | XMLHttpRequest.prototype.withCredentials; |
| 1753 | |
| 1754 | /** |
| 1755 | * @type {XMLHttpRequestUpload} |
| 1756 | * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-upload-attribute |
| 1757 | */ |
| 1758 | XMLHttpRequest.prototype.upload; |
| 1759 | |
| 1760 | /** |
| 1761 | * @param {string} mimeType The mime type to override with. |
| 1762 | */ |
| 1763 | XMLHttpRequest.prototype.overrideMimeType = function(mimeType) {}; |
| 1764 | |
| 1765 | /** |
| 1766 | * @type {string} |
| 1767 | * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-responsetype-attribute |
| 1768 | */ |
| 1769 | XMLHttpRequest.prototype.responseType; |
| 1770 | |
| 1771 | /** |
| 1772 | * @type {*} |
| 1773 | * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-responsetype-attribute |
| 1774 | */ |
| 1775 | XMLHttpRequest.prototype.response; |
| 1776 | |
| 1777 | |
| 1778 | /** |
| 1779 | * @type {ArrayBuffer} |
| 1780 | * Implemented as a draft spec in Firefox 4 as the way to get a requested array |
| 1781 | * buffer from an XMLHttpRequest. |
| 1782 | * @see https://developer.mozilla.org/En/Using_XMLHttpRequest#Receiving_binary_data_using_JavaScript_typed_arrays |
| 1783 | */ |
| 1784 | XMLHttpRequest.prototype.mozResponseArrayBuffer; |
| 1785 | |
| 1786 | /** |
| 1787 | * XMLHttpRequestEventTarget defines events for checking the status of a data |
| 1788 | * transfer between a client and a server. This should be a common base class |
| 1789 | * for XMLHttpRequest and XMLHttpRequestUpload. |
| 1790 | * |
| 1791 | * @constructor |
| 1792 | * @implements {EventTarget} |
| 1793 | */ |
| 1794 | function XMLHttpRequestEventTarget() {} |
| 1795 | |
| 1796 | /** @override */ |
| 1797 | XMLHttpRequestEventTarget.prototype.addEventListener = function( |
| 1798 | type, listener, useCapture) {}; |
| 1799 | |
| 1800 | /** @override */ |
| 1801 | XMLHttpRequestEventTarget.prototype.removeEventListener = function( |
| 1802 | type, listener, useCapture) {}; |
| 1803 | |
| 1804 | /** @override */ |
| 1805 | XMLHttpRequestEventTarget.prototype.dispatchEvent = function(evt) {}; |
| 1806 | |
| 1807 | /** |
| 1808 | * An event target to track the status of an upload. |
| 1809 | * |
| 1810 | * @constructor |
| 1811 | * @extends {XMLHttpRequestEventTarget} |
| 1812 | */ |
| 1813 | function XMLHttpRequestUpload() {} |
| 1814 | |
| 1815 | /** |
| 1816 | * @param {number=} opt_width |
| 1817 | * @param {number=} opt_height |
| 1818 | * @constructor |
| 1819 | * @extends {HTMLImageElement} |
| 1820 | */ |
| 1821 | function Image(opt_width, opt_height) {} |
| 1822 | |
| 1823 | |
| 1824 | /** |
| 1825 | * Dataset collection. |
| 1826 | * This is really a DOMStringMap but it behaves close enough to an object to |
| 1827 | * pass as an object. |
| 1828 | * @type {Object} |
| 1829 | * @const |
| 1830 | */ |
| 1831 | HTMLElement.prototype.dataset; |
| 1832 | |
| 1833 | |
| 1834 | /** |
| 1835 | * @constructor |
| 1836 | */ |
| 1837 | function DOMTokenList() {} |
| 1838 | |
| 1839 | /** |
| 1840 | * Returns the number of CSS classes applied to this Element. |
| 1841 | * @type {number} |
| 1842 | */ |
| 1843 | DOMTokenList.prototype.length; |
| 1844 | |
| 1845 | /** |
| 1846 | * @param {number} index The index of the item to return. |
| 1847 | * @return {string} The CSS class at the specified index. |
| 1848 | * @nosideeffects |
| 1849 | */ |
| 1850 | DOMTokenList.prototype.item = function(index) {}; |
| 1851 | |
| 1852 | /** |
| 1853 | * @param {string} token The CSS class to check for. |
| 1854 | * @return {boolean} Whether the CSS class has been applied to the Element. |
| 1855 | * @nosideeffects |
| 1856 | */ |
| 1857 | DOMTokenList.prototype.contains = function(token) {}; |
| 1858 | |
| 1859 | /** |
| 1860 | * @param {string} token The CSS class to add to this element. |
| 1861 | */ |
| 1862 | DOMTokenList.prototype.add = function(token) {}; |
| 1863 | |
| 1864 | /** |
| 1865 | * @param {string} token The CSS class to remove from this element. |
| 1866 | */ |
| 1867 | DOMTokenList.prototype.remove = function(token) {}; |
| 1868 | |
| 1869 | /** |
| 1870 | * @param {string} token The CSS class to toggle from this element. |
| 1871 | * @return {boolean} False if the token was removed; True otherwise. |
| 1872 | */ |
| 1873 | DOMTokenList.prototype.toggle = function(token) {}; |
| 1874 | |
| 1875 | /** |
| 1876 | * @return {string} A stringified representation of CSS classes. |
| 1877 | * @nosideeffects |
| 1878 | * @override |
| 1879 | */ |
| 1880 | DOMTokenList.prototype.toString = function() {}; |
| 1881 | |
| 1882 | /** |
| 1883 | * A better interface to CSS classes than className. |
| 1884 | * @type {DOMTokenList} |
| 1885 | * @see http://www.w3.org/TR/html5/elements.html#dom-classlist |
| 1886 | * @const |
| 1887 | */ |
| 1888 | HTMLElement.prototype.classList; |
| 1889 | |
| 1890 | |
| 1891 | /** |
| 1892 | * @param {number} length The length in bytes |
| 1893 | * @constructor |
| 1894 | * @noalias |
| 1895 | * @throws {Error} |
| 1896 | * @nosideeffects |
| 1897 | * @implements {Transferable} |
| 1898 | */ |
| 1899 | function ArrayBuffer(length) {} |
| 1900 | |
| 1901 | /** @type {number} */ |
| 1902 | ArrayBuffer.prototype.byteLength; |
| 1903 | |
| 1904 | /** |
| 1905 | * @param {number} begin |
| 1906 | * @param {number=} opt_end |
| 1907 | * @return {!ArrayBuffer} |
| 1908 | * @nosideeffects |
| 1909 | */ |
| 1910 | ArrayBuffer.prototype.slice = function(begin, opt_end) {}; |
| 1911 | |
| 1912 | |
| 1913 | /** |
| 1914 | * @constructor |
| 1915 | * @noalias |
| 1916 | */ |
| 1917 | function ArrayBufferView() {} |
| 1918 | |
| 1919 | /** @type {!ArrayBuffer} */ |
| 1920 | ArrayBufferView.prototype.buffer; |
| 1921 | |
| 1922 | /** @type {number} */ |
| 1923 | ArrayBufferView.prototype.byteOffset; |
| 1924 | |
| 1925 | /** @type {number} */ |
| 1926 | ArrayBufferView.prototype.byteLength; |
| 1927 | |
| 1928 | |
| 1929 | /** |
| 1930 | * @param {number|ArrayBufferView|Array.<number>|ArrayBuffer} length or array |
| 1931 | * or buffer |
| 1932 | * @param {number=} opt_byteOffset |
| 1933 | * @param {number=} opt_length |
| 1934 | * @extends {ArrayBufferView} |
| 1935 | * @constructor |
| 1936 | * @noalias |
| 1937 | * @throws {Error} |
| 1938 | * @modifies {arguments} If the user passes a backing array, then indexed |
| 1939 | * accesses will modify the backing array. JSCompiler does not model |
| 1940 | * this well. In other words, if you have: |
| 1941 | * <code> |
| 1942 | * var x = new ArrayBuffer(1); |
| 1943 | * var y = new Int8Array(x); |
| 1944 | * y[0] = 2; |
| 1945 | * </code> |
| 1946 | * JSCompiler will not recognize that the last assignment modifies x. |
| 1947 | * We workaround this by marking all these arrays as @modifies {arguments}, |
| 1948 | * to introduce the possibility that x aliases y. |
| 1949 | */ |
| 1950 | function Int8Array(length, opt_byteOffset, opt_length) {} |
| 1951 | |
| 1952 | /** @type {number} */ |
| 1953 | Int8Array.BYTES_PER_ELEMENT; |
| 1954 | |
| 1955 | /** @type {number} */ |
| 1956 | Int8Array.prototype.BYTES_PER_ELEMENT; |
| 1957 | |
| 1958 | /** @type {number} */ |
| 1959 | Int8Array.prototype.length; |
| 1960 | |
| 1961 | /** |
| 1962 | * @param {ArrayBufferView|Array.<number>} array |
| 1963 | * @param {number=} opt_offset |
| 1964 | */ |
| 1965 | Int8Array.prototype.set = function(array, opt_offset) {}; |
| 1966 | |
| 1967 | /** |
| 1968 | * @param {number} begin |
| 1969 | * @param {number=} opt_end |
| 1970 | * @return {!Int8Array} |
| 1971 | * @nosideeffects |
| 1972 | */ |
| 1973 | Int8Array.prototype.subarray = function(begin, opt_end) {}; |
| 1974 | |
| 1975 | |
| 1976 | /** |
| 1977 | * @param {number|ArrayBufferView|Array.<number>|ArrayBuffer} length or array |
| 1978 | * or buffer |
| 1979 | * @param {number=} opt_byteOffset |
| 1980 | * @param {number=} opt_length |
| 1981 | * @extends {ArrayBufferView} |
| 1982 | * @constructor |
| 1983 | * @noalias |
| 1984 | * @throws {Error} |
| 1985 | * @modifies {arguments} |
| 1986 | */ |
| 1987 | function Uint8Array(length, opt_byteOffset, opt_length) {} |
| 1988 | |
| 1989 | /** @type {number} */ |
| 1990 | Uint8Array.BYTES_PER_ELEMENT; |
| 1991 | |
| 1992 | /** @type {number} */ |
| 1993 | Uint8Array.prototype.BYTES_PER_ELEMENT; |
| 1994 | |
| 1995 | /** @type {number} */ |
| 1996 | Uint8Array.prototype.length; |
| 1997 | |
| 1998 | /** |
| 1999 | * @param {ArrayBufferView|Array.<number>} array |
| 2000 | * @param {number=} opt_offset |
| 2001 | */ |
| 2002 | Uint8Array.prototype.set = function(array, opt_offset) {}; |
| 2003 | |
| 2004 | /** |
| 2005 | * @param {number} begin |
| 2006 | * @param {number=} opt_end |
| 2007 | * @return {!Uint8Array} |
| 2008 | * @nosideeffects |
| 2009 | */ |
| 2010 | Uint8Array.prototype.subarray = function(begin, opt_end) {}; |
| 2011 | |
| 2012 | |
| 2013 | /** |
| 2014 | * @param {number|ArrayBufferView|Array.<number>|ArrayBuffer} length or array |
| 2015 | * or buffer |
| 2016 | * @param {number=} opt_byteOffset |
| 2017 | * @param {number=} opt_length |
| 2018 | * @extends {ArrayBufferView} |
| 2019 | * @constructor |
| 2020 | * @noalias |
| 2021 | * @throws {Error} |
| 2022 | * @modifies {arguments} |
| 2023 | */ |
| 2024 | function Uint8ClampedArray(length, opt_byteOffset, opt_length) {} |
| 2025 | |
| 2026 | /** @type {number} */ |
| 2027 | Uint8ClampedArray.BYTES_PER_ELEMENT; |
| 2028 | |
| 2029 | /** @type {number} */ |
| 2030 | Uint8ClampedArray.prototype.BYTES_PER_ELEMENT; |
| 2031 | |
| 2032 | /** @type {number} */ |
| 2033 | Uint8ClampedArray.prototype.length; |
| 2034 | |
| 2035 | /** |
| 2036 | * @param {ArrayBufferView|Array.<number>} array |
| 2037 | * @param {number=} opt_offset |
| 2038 | */ |
| 2039 | Uint8ClampedArray.prototype.set = function(array, opt_offset) {}; |
| 2040 | |
| 2041 | /** |
| 2042 | * @param {number} begin |
| 2043 | * @param {number=} opt_end |
| 2044 | * @return {!Uint8ClampedArray} |
| 2045 | * @nosideeffects |
| 2046 | */ |
| 2047 | Uint8ClampedArray.prototype.subarray = function(begin, opt_end) {}; |
| 2048 | |
| 2049 | |
| 2050 | /** |
| 2051 | * @typedef {Uint8ClampedArray} |
| 2052 | * @deprecated CanvasPixelArray has been replaced by Uint8ClampedArray |
| 2053 | * in the latest spec. |
| 2054 | * @see http://www.w3.org/TR/2dcontext/#imagedata |
| 2055 | */ |
| 2056 | var CanvasPixelArray; |
| 2057 | |
| 2058 | |
| 2059 | /** |
| 2060 | * @param {number|ArrayBufferView|Array.<number>|ArrayBuffer} length or array |
| 2061 | * or buffer |
| 2062 | * @param {number=} opt_byteOffset |
| 2063 | * @param {number=} opt_length |
| 2064 | * @extends {ArrayBufferView} |
| 2065 | * @constructor |
| 2066 | * @noalias |
| 2067 | * @throws {Error} |
| 2068 | * @modifies {arguments} |
| 2069 | */ |
| 2070 | function Int16Array(length, opt_byteOffset, opt_length) {} |
| 2071 | |
| 2072 | /** @type {number} */ |
| 2073 | Int16Array.BYTES_PER_ELEMENT; |
| 2074 | |
| 2075 | /** @type {number} */ |
| 2076 | Int16Array.prototype.BYTES_PER_ELEMENT; |
| 2077 | |
| 2078 | /** @type {number} */ |
| 2079 | Int16Array.prototype.length; |
| 2080 | |
| 2081 | /** |
| 2082 | * @param {ArrayBufferView|Array.<number>} array |
| 2083 | * @param {number=} opt_offset |
| 2084 | */ |
| 2085 | Int16Array.prototype.set = function(array, opt_offset) {}; |
| 2086 | |
| 2087 | /** |
| 2088 | * @param {number} begin |
| 2089 | * @param {number=} opt_end |
| 2090 | * @return {!Int16Array} |
| 2091 | * @nosideeffects |
| 2092 | */ |
| 2093 | Int16Array.prototype.subarray = function(begin, opt_end) {}; |
| 2094 | |
| 2095 | |
| 2096 | /** |
| 2097 | * @param {number|ArrayBufferView|Array.<number>|ArrayBuffer} length or array |
| 2098 | * or buffer |
| 2099 | * @param {number=} opt_byteOffset |
| 2100 | * @param {number=} opt_length |
| 2101 | * @extends {ArrayBufferView} |
| 2102 | * @constructor |
| 2103 | * @noalias |
| 2104 | * @throws {Error} |
| 2105 | * @modifies {arguments} |
| 2106 | */ |
| 2107 | function Uint16Array(length, opt_byteOffset, opt_length) {} |
| 2108 | |
| 2109 | /** @type {number} */ |
| 2110 | Uint16Array.BYTES_PER_ELEMENT; |
| 2111 | |
| 2112 | /** @type {number} */ |
| 2113 | Uint16Array.prototype.BYTES_PER_ELEMENT; |
| 2114 | |
| 2115 | /** @type {number} */ |
| 2116 | Uint16Array.prototype.length; |
| 2117 | |
| 2118 | /** |
| 2119 | * @param {ArrayBufferView|Array.<number>} array |
| 2120 | * @param {number=} opt_offset |
| 2121 | */ |
| 2122 | Uint16Array.prototype.set = function(array, opt_offset) {}; |
| 2123 | |
| 2124 | /** |
| 2125 | * @param {number} begin |
| 2126 | * @param {number=} opt_end |
| 2127 | * @return {!Uint16Array} |
| 2128 | * @nosideeffects |
| 2129 | */ |
| 2130 | Uint16Array.prototype.subarray = function(begin, opt_end) {}; |
| 2131 | |
| 2132 | |
| 2133 | /** |
| 2134 | * @param {number|ArrayBufferView|Array.<number>|ArrayBuffer} length or array |
| 2135 | * or buffer |
| 2136 | * @param {number=} opt_byteOffset |
| 2137 | * @param {number=} opt_length |
| 2138 | * @extends {ArrayBufferView} |
| 2139 | * @constructor |
| 2140 | * @noalias |
| 2141 | * @throws {Error} |
| 2142 | * @modifies {arguments} |
| 2143 | */ |
| 2144 | function Int32Array(length, opt_byteOffset, opt_length) {} |
| 2145 | |
| 2146 | /** @type {number} */ |
| 2147 | Int32Array.BYTES_PER_ELEMENT; |
| 2148 | |
| 2149 | /** @type {number} */ |
| 2150 | Int32Array.prototype.BYTES_PER_ELEMENT; |
| 2151 | |
| 2152 | /** @type {number} */ |
| 2153 | Int32Array.prototype.length; |
| 2154 | |
| 2155 | /** |
| 2156 | * @param {ArrayBufferView|Array.<number>} array |
| 2157 | * @param {number=} opt_offset |
| 2158 | */ |
| 2159 | Int32Array.prototype.set = function(array, opt_offset) {}; |
| 2160 | |
| 2161 | /** |
| 2162 | * @param {number} begin |
| 2163 | * @param {number=} opt_end |
| 2164 | * @return {!Int32Array} |
| 2165 | * @nosideeffects |
| 2166 | */ |
| 2167 | Int32Array.prototype.subarray = function(begin, opt_end) {}; |
| 2168 | |
| 2169 | |
| 2170 | /** |
| 2171 | * @param {number|ArrayBufferView|Array.<number>|ArrayBuffer} length or array |
| 2172 | * or buffer |
| 2173 | * @param {number=} opt_byteOffset |
| 2174 | * @param {number=} opt_length |
| 2175 | * @extends {ArrayBufferView} |
| 2176 | * @constructor |
| 2177 | * @noalias |
| 2178 | * @throws {Error} |
| 2179 | * @modifies {arguments} |
| 2180 | */ |
| 2181 | function Uint32Array(length, opt_byteOffset, opt_length) {} |
| 2182 | |
| 2183 | /** @type {number} */ |
| 2184 | Uint32Array.BYTES_PER_ELEMENT; |
| 2185 | |
| 2186 | /** @type {number} */ |
| 2187 | Uint32Array.prototype.BYTES_PER_ELEMENT; |
| 2188 | |
| 2189 | /** @type {number} */ |
| 2190 | Uint32Array.prototype.length; |
| 2191 | |
| 2192 | /** |
| 2193 | * @param {ArrayBufferView|Array.<number>} array |
| 2194 | * @param {number=} opt_offset |
| 2195 | */ |
| 2196 | Uint32Array.prototype.set = function(array, opt_offset) {}; |
| 2197 | |
| 2198 | /** |
| 2199 | * @param {number} begin |
| 2200 | * @param {number=} opt_end |
| 2201 | * @return {!Uint32Array} |
| 2202 | * @nosideeffects |
| 2203 | */ |
| 2204 | Uint32Array.prototype.subarray = function(begin, opt_end) {}; |
| 2205 | |
| 2206 | |
| 2207 | /** |
| 2208 | * @param {number|ArrayBufferView|Array.<number>|ArrayBuffer} length or array |
| 2209 | * or buffer |
| 2210 | * @param {number=} opt_byteOffset |
| 2211 | * @param {number=} opt_length |
| 2212 | * @extends {ArrayBufferView} |
| 2213 | * @constructor |
| 2214 | * @noalias |
| 2215 | * @throws {Error} |
| 2216 | * @modifies {arguments} |
| 2217 | */ |
| 2218 | function Float32Array(length, opt_byteOffset, opt_length) {} |
| 2219 | |
| 2220 | /** @type {number} */ |
| 2221 | Float32Array.BYTES_PER_ELEMENT; |
| 2222 | |
| 2223 | /** @type {number} */ |
| 2224 | Float32Array.prototype.BYTES_PER_ELEMENT; |
| 2225 | |
| 2226 | /** @type {number} */ |
| 2227 | Float32Array.prototype.length; |
| 2228 | |
| 2229 | /** |
| 2230 | * @param {ArrayBufferView|Array.<number>} array |
| 2231 | * @param {number=} opt_offset |
| 2232 | */ |
| 2233 | Float32Array.prototype.set = function(array, opt_offset) {}; |
| 2234 | |
| 2235 | /** |
| 2236 | * @param {number} begin |
| 2237 | * @param {number=} opt_end |
| 2238 | * @return {!Float32Array} |
| 2239 | * @nosideeffects |
| 2240 | */ |
| 2241 | Float32Array.prototype.subarray = function(begin, opt_end) {}; |
| 2242 | |
| 2243 | |
| 2244 | /** |
| 2245 | * @param {number|ArrayBufferView|Array.<number>|ArrayBuffer} length or array |
| 2246 | * or buffer |
| 2247 | * @param {number=} opt_byteOffset |
| 2248 | * @param {number=} opt_length |
| 2249 | * @extends {ArrayBufferView} |
| 2250 | * @constructor |
| 2251 | * @noalias |
| 2252 | * @throws {Error} |
| 2253 | * @modifies {arguments} |
| 2254 | */ |
| 2255 | function Float64Array(length, opt_byteOffset, opt_length) {} |
| 2256 | |
| 2257 | /** @type {number} */ |
| 2258 | Float64Array.BYTES_PER_ELEMENT; |
| 2259 | |
| 2260 | /** @type {number} */ |
| 2261 | Float64Array.prototype.BYTES_PER_ELEMENT; |
| 2262 | |
| 2263 | /** @type {number} */ |
| 2264 | Float64Array.prototype.length; |
| 2265 | |
| 2266 | /** |
| 2267 | * @param {ArrayBufferView|Array.<number>} array |
| 2268 | * @param {number=} opt_offset |
| 2269 | */ |
| 2270 | Float64Array.prototype.set = function(array, opt_offset) {}; |
| 2271 | |
| 2272 | /** |
| 2273 | * @param {number} begin |
| 2274 | * @param {number=} opt_end |
| 2275 | * @return {!Float64Array} |
| 2276 | * @nosideeffects |
| 2277 | */ |
| 2278 | Float64Array.prototype.subarray = function(begin, opt_end) {}; |
| 2279 | |
| 2280 | |
| 2281 | /** |
| 2282 | * @param {ArrayBuffer} buffer |
| 2283 | * @param {number=} opt_byteOffset |
| 2284 | * @param {number=} opt_byteLength |
| 2285 | * @extends {ArrayBufferView} |
| 2286 | * @constructor |
| 2287 | * @noalias |
| 2288 | * @throws {Error} |
| 2289 | * @nosideeffects |
| 2290 | */ |
| 2291 | function DataView(buffer, opt_byteOffset, opt_byteLength) {} |
| 2292 | |
| 2293 | /** |
| 2294 | * @param {number} byteOffset |
| 2295 | * @return {number} |
| 2296 | * @throws {Error} |
| 2297 | * @nosideeffects |
| 2298 | */ |
| 2299 | DataView.prototype.getInt8 = function(byteOffset) {}; |
| 2300 | |
| 2301 | /** |
| 2302 | * @param {number} byteOffset |
| 2303 | * @return {number} |
| 2304 | * @throws {Error} |
| 2305 | * @nosideeffects |
| 2306 | */ |
| 2307 | DataView.prototype.getUint8 = function(byteOffset) {}; |
| 2308 | |
| 2309 | /** |
| 2310 | * @param {number} byteOffset |
| 2311 | * @param {boolean=} opt_littleEndian |
| 2312 | * @return {number} |
| 2313 | * @throws {Error} |
| 2314 | * @nosideeffects |
| 2315 | */ |
| 2316 | DataView.prototype.getInt16 = function(byteOffset, opt_littleEndian) {}; |
| 2317 | |
| 2318 | /** |
| 2319 | * @param {number} byteOffset |
| 2320 | * @param {boolean=} opt_littleEndian |
| 2321 | * @return {number} |
| 2322 | * @throws {Error} |
| 2323 | * @nosideeffects |
| 2324 | */ |
| 2325 | DataView.prototype.getUint16 = function(byteOffset, opt_littleEndian) {}; |
| 2326 | |
| 2327 | /** |
| 2328 | * @param {number} byteOffset |
| 2329 | * @param {boolean=} opt_littleEndian |
| 2330 | * @return {number} |
| 2331 | * @throws {Error} |
| 2332 | * @nosideeffects |
| 2333 | */ |
| 2334 | DataView.prototype.getInt32 = function(byteOffset, opt_littleEndian) {}; |
| 2335 | |
| 2336 | /** |
| 2337 | * @param {number} byteOffset |
| 2338 | * @param {boolean=} opt_littleEndian |
| 2339 | * @return {number} |
| 2340 | * @throws {Error} |
| 2341 | * @nosideeffects |
| 2342 | */ |
| 2343 | DataView.prototype.getUint32 = function(byteOffset, opt_littleEndian) {}; |
| 2344 | |
| 2345 | /** |
| 2346 | * @param {number} byteOffset |
| 2347 | * @param {boolean=} opt_littleEndian |
| 2348 | * @return {number} |
| 2349 | * @throws {Error} |
| 2350 | * @nosideeffects |
| 2351 | */ |
| 2352 | DataView.prototype.getFloat32 = function(byteOffset, opt_littleEndian) {}; |
| 2353 | |
| 2354 | /** |
| 2355 | * @param {number} byteOffset |
| 2356 | * @param {boolean=} opt_littleEndian |
| 2357 | * @return {number} |
| 2358 | * @throws {Error} |
| 2359 | * @nosideeffects |
| 2360 | */ |
| 2361 | DataView.prototype.getFloat64 = function(byteOffset, opt_littleEndian) {}; |
| 2362 | |
| 2363 | /** |
| 2364 | * @param {number} byteOffset |
| 2365 | * @param {number} value |
| 2366 | * @throws {Error} |
| 2367 | */ |
| 2368 | DataView.prototype.setInt8 = function(byteOffset, value) {}; |
| 2369 | |
| 2370 | /** |
| 2371 | * @param {number} byteOffset |
| 2372 | * @param {number} value |
| 2373 | * @throws {Error} |
| 2374 | */ |
| 2375 | DataView.prototype.setUint8 = function(byteOffset, value) {}; |
| 2376 | |
| 2377 | /** |
| 2378 | * @param {number} byteOffset |
| 2379 | * @param {number} value |
| 2380 | * @param {boolean=} opt_littleEndian |
| 2381 | * @throws {Error} |
| 2382 | */ |
| 2383 | DataView.prototype.setInt16 = function(byteOffset, value, opt_littleEndian) {}; |
| 2384 | |
| 2385 | /** |
| 2386 | * @param {number} byteOffset |
| 2387 | * @param {number} value |
| 2388 | * @param {boolean=} opt_littleEndian |
| 2389 | * @throws {Error} |
| 2390 | */ |
| 2391 | DataView.prototype.setUint16 = function(byteOffset, value, opt_littleEndian) {}; |
| 2392 | |
| 2393 | /** |
| 2394 | * @param {number} byteOffset |
| 2395 | * @param {number} value |
| 2396 | * @param {boolean=} opt_littleEndian |
| 2397 | * @throws {Error} |
| 2398 | */ |
| 2399 | DataView.prototype.setInt32 = function(byteOffset, value, opt_littleEndian) {}; |
| 2400 | |
| 2401 | /** |
| 2402 | * @param {number} byteOffset |
| 2403 | * @param {number} value |
| 2404 | * @param {boolean=} opt_littleEndian |
| 2405 | * @throws {Error} |
| 2406 | */ |
| 2407 | DataView.prototype.setUint32 = function(byteOffset, value, opt_littleEndian) {}; |
| 2408 | |
| 2409 | /** |
| 2410 | * @param {number} byteOffset |
| 2411 | * @param {number} value |
| 2412 | * @param {boolean=} opt_littleEndian |
| 2413 | * @throws {Error} |
| 2414 | */ |
| 2415 | DataView.prototype.setFloat32 = function( |
| 2416 | byteOffset, value, opt_littleEndian) {}; |
| 2417 | |
| 2418 | /** |
| 2419 | * @param {number} byteOffset |
| 2420 | * @param {number} value |
| 2421 | * @param {boolean=} opt_littleEndian |
| 2422 | * @throws {Error} |
| 2423 | */ |
| 2424 | DataView.prototype.setFloat64 = function( |
| 2425 | byteOffset, value, opt_littleEndian) {}; |
| 2426 | |
| 2427 | /** |
| 2428 | * Constraint Validation API properties and methods |
| 2429 | * @see http://www.w3.org/TR/2009/WD-html5-20090423/forms.html#the-constraint-validation-api |
| 2430 | */ |
| 2431 | |
| 2432 | /** @return {boolean} */ |
| 2433 | HTMLFormElement.prototype.checkValidity = function() {}; |
| 2434 | |
| 2435 | /** @type {boolean} */ |
| 2436 | HTMLFormElement.prototype.novalidate; |
| 2437 | |
| 2438 | /** @constructor */ |
| 2439 | function ValidityState() {} |
| 2440 | |
| 2441 | /** @type {boolean} */ |
| 2442 | ValidityState.prototype.customError; |
| 2443 | |
| 2444 | /** @type {boolean} */ |
| 2445 | ValidityState.prototype.patternMismatch; |
| 2446 | |
| 2447 | /** @type {boolean} */ |
| 2448 | ValidityState.prototype.rangeOverflow; |
| 2449 | |
| 2450 | /** @type {boolean} */ |
| 2451 | ValidityState.prototype.rangeUnderflow; |
| 2452 | |
| 2453 | /** @type {boolean} */ |
| 2454 | ValidityState.prototype.stepMismatch; |
| 2455 | |
| 2456 | /** @type {boolean} */ |
| 2457 | ValidityState.prototype.typeMismatch; |
| 2458 | |
| 2459 | /** @type {boolean} */ |
| 2460 | ValidityState.prototype.tooLong; |
| 2461 | |
| 2462 | /** @type {boolean} */ |
| 2463 | ValidityState.prototype.valid; |
| 2464 | |
| 2465 | /** @type {boolean} */ |
| 2466 | ValidityState.prototype.valueMissing; |
| 2467 | |
| 2468 | |
| 2469 | /** @type {boolean} */ |
| 2470 | HTMLButtonElement.prototype.autofocus; |
| 2471 | |
| 2472 | /** |
| 2473 | * @const |
| 2474 | * @type {NodeList} |
| 2475 | */ |
| 2476 | HTMLButtonElement.prototype.labels; |
| 2477 | |
| 2478 | /** @type {string} */ |
| 2479 | HTMLButtonElement.prototype.validationMessage; |
| 2480 | |
| 2481 | /** |
| 2482 | * @const |
| 2483 | * @type {ValidityState} |
| 2484 | */ |
| 2485 | HTMLButtonElement.prototype.validity; |
| 2486 | |
| 2487 | /** @type {boolean} */ |
| 2488 | HTMLButtonElement.prototype.willValidate; |
| 2489 | |
| 2490 | /** @return {boolean} */ |
| 2491 | HTMLButtonElement.prototype.checkValidity = function() {}; |
| 2492 | |
| 2493 | /** @param {string} message */ |
| 2494 | HTMLButtonElement.prototype.setCustomValidity = function(message) {}; |
| 2495 | |
| 2496 | /** @type {boolean} */ |
| 2497 | HTMLInputElement.prototype.autofocus; |
| 2498 | |
| 2499 | /** @type {boolean} */ |
| 2500 | HTMLInputElement.prototype.formNoValidate; |
| 2501 | |
| 2502 | /** |
| 2503 | * @const |
| 2504 | * @type {NodeList} |
| 2505 | */ |
| 2506 | HTMLInputElement.prototype.labels; |
| 2507 | |
| 2508 | /** @type {string} */ |
| 2509 | HTMLInputElement.prototype.validationMessage; |
| 2510 | |
| 2511 | /** |
| 2512 | * @const |
| 2513 | * @type {ValidityState} |
| 2514 | */ |
| 2515 | HTMLInputElement.prototype.validity; |
| 2516 | |
| 2517 | /** @type {boolean} */ |
| 2518 | HTMLInputElement.prototype.willValidate; |
| 2519 | |
| 2520 | /** @return {boolean} */ |
| 2521 | HTMLInputElement.prototype.checkValidity = function() {}; |
| 2522 | |
| 2523 | /** @param {string} message */ |
| 2524 | HTMLInputElement.prototype.setCustomValidity = function(message) {}; |
| 2525 | |
| 2526 | /** @type {Element} */ |
| 2527 | HTMLLabelElement.prototype.control; |
| 2528 | |
| 2529 | /** @type {boolean} */ |
| 2530 | HTMLSelectElement.prototype.autofocus; |
| 2531 | |
| 2532 | /** |
| 2533 | * @const |
| 2534 | * @type {NodeList} |
| 2535 | */ |
| 2536 | HTMLSelectElement.prototype.labels; |
| 2537 | |
| 2538 | /** @type {string} */ |
| 2539 | HTMLSelectElement.prototype.validationMessage; |
| 2540 | |
| 2541 | /** |
| 2542 | * @const |
| 2543 | * @type {ValidityState} |
| 2544 | */ |
| 2545 | HTMLSelectElement.prototype.validity; |
| 2546 | |
| 2547 | /** @type {boolean} */ |
| 2548 | HTMLSelectElement.prototype.willValidate; |
| 2549 | |
| 2550 | /** @return {boolean} */ |
| 2551 | HTMLSelectElement.prototype.checkValidity = function() {}; |
| 2552 | |
| 2553 | /** @param {string} message */ |
| 2554 | HTMLSelectElement.prototype.setCustomValidity = function(message) {}; |
| 2555 | |
| 2556 | /** @type {boolean} */ |
| 2557 | HTMLTextAreaElement.prototype.autofocus; |
| 2558 | |
| 2559 | /** |
| 2560 | * @const |
| 2561 | * @type {NodeList} |
| 2562 | */ |
| 2563 | HTMLTextAreaElement.prototype.labels; |
| 2564 | |
| 2565 | /** @type {string} */ |
| 2566 | HTMLTextAreaElement.prototype.validationMessage; |
| 2567 | |
| 2568 | /** |
| 2569 | * @const |
| 2570 | * @type {ValidityState} |
| 2571 | */ |
| 2572 | HTMLTextAreaElement.prototype.validity; |
| 2573 | |
| 2574 | /** @type {boolean} */ |
| 2575 | HTMLTextAreaElement.prototype.willValidate; |
| 2576 | |
| 2577 | /** @return {boolean} */ |
| 2578 | HTMLTextAreaElement.prototype.checkValidity = function() {}; |
| 2579 | |
| 2580 | /** @param {string} message */ |
| 2581 | HTMLTextAreaElement.prototype.setCustomValidity = function(message) {}; |
| 2582 | |
| 2583 | /** |
| 2584 | * @constructor |
| 2585 | * @extends {HTMLElement} |
| 2586 | * @see http://www.w3.org/TR/html5/the-embed-element.html#htmlembedelement |
| 2587 | */ |
| 2588 | function HTMLEmbedElement() {} |
| 2589 | |
| 2590 | /** |
| 2591 | * @type {string} |
| 2592 | * @see http://www.w3.org/TR/html5/dimension-attributes.html#dom-dim-width |
| 2593 | */ |
| 2594 | HTMLEmbedElement.prototype.width; |
| 2595 | |
| 2596 | /** |
| 2597 | * @type {string} |
| 2598 | * @see http://www.w3.org/TR/html5/dimension-attributes.html#dom-dim-height |
| 2599 | */ |
| 2600 | HTMLEmbedElement.prototype.height; |
| 2601 | |
| 2602 | /** |
| 2603 | * @type {string} |
| 2604 | * @see http://www.w3.org/TR/html5/the-embed-element.html#dom-embed-src |
| 2605 | */ |
| 2606 | HTMLEmbedElement.prototype.src; |
| 2607 | |
| 2608 | /** |
| 2609 | * @type {string} |
| 2610 | * @see http://www.w3.org/TR/html5/the-embed-element.html#dom-embed-type |
| 2611 | */ |
| 2612 | HTMLEmbedElement.prototype.type; |
| 2613 | |
| 2614 | // Fullscreen APIs. |
| 2615 | |
| 2616 | /** |
| 2617 | * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-element-requestfullscreen |
| 2618 | */ |
| 2619 | Element.prototype.requestFullscreen = function() {}; |
| 2620 | |
| 2621 | /** |
| 2622 | * @type {boolean} |
| 2623 | * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-document-fullscreenenabled |
| 2624 | */ |
| 2625 | Document.prototype.fullscreenEnabled; |
| 2626 | |
| 2627 | /** |
| 2628 | * @type {Element} |
| 2629 | * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-document-fullscreenelement |
| 2630 | */ |
| 2631 | Document.prototype.fullscreenElement; |
| 2632 | |
| 2633 | /** |
| 2634 | * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-document-exitfullscreen |
| 2635 | */ |
| 2636 | Document.prototype.exitFullscreen = function() {}; |
| 2637 | |
| 2638 | // Externs definitions of browser current implementations. |
| 2639 | // Firefox 10 implementation. |
| 2640 | Element.prototype.mozRequestFullScreen = function() {}; |
| 2641 | |
| 2642 | Element.prototype.mozRequestFullScreenWithKeys = function() {}; |
| 2643 | |
| 2644 | /** @type {boolean} */ |
| 2645 | Document.prototype.mozFullScreen; |
| 2646 | |
| 2647 | Document.prototype.mozCancelFullScreen = function() {}; |
| 2648 | |
| 2649 | /** @type {Element} */ |
| 2650 | Document.prototype.mozFullScreenElement; |
| 2651 | |
| 2652 | /** @type {boolean} */ |
| 2653 | Document.prototype.mozFullScreenEnabled; |
| 2654 | |
| 2655 | // Chrome 21 implementation. |
| 2656 | /** |
| 2657 | * The current fullscreen element for the document is set to this element. |
| 2658 | * Valid only for Webkit browsers. |
| 2659 | * @param {number=} opt_allowKeyboardInput Whether keyboard input is desired. |
| 2660 | * Should use ALLOW_KEYBOARD_INPUT constant. |
| 2661 | */ |
| 2662 | Element.prototype.webkitRequestFullScreen = function(opt_allowKeyboardInput) {}; |
| 2663 | |
| 2664 | /** |
| 2665 | * The current fullscreen element for the document is set to this element. |
| 2666 | * Valid only for Webkit browsers. |
| 2667 | * @param {number=} opt_allowKeyboardInput Whether keyboard input is desired. |
| 2668 | * Should use ALLOW_KEYBOARD_INPUT constant. |
| 2669 | */ |
| 2670 | Element.prototype.webkitRequestFullscreen = function(opt_allowKeyboardInput) {}; |
| 2671 | |
| 2672 | /** @type {boolean} */ |
| 2673 | Document.prototype.webkitIsFullScreen; |
| 2674 | |
| 2675 | Document.prototype.webkitCancelFullScreen = function() {}; |
| 2676 | |
| 2677 | /** @type {Element} */ |
| 2678 | Document.prototype.webkitCurrentFullScreenElement; |
| 2679 | |
| 2680 | /** @type {boolean} */ |
| 2681 | Document.prototype.webkitFullScreenKeyboardInputAllowed; |
| 2682 | |
| 2683 | /** @type {number} */ |
| 2684 | Element.ALLOW_KEYBOARD_INPUT = 1; |
| 2685 | |
| 2686 | /** @type {number} */ |
| 2687 | Element.prototype.ALLOW_KEYBOARD_INPUT = 1; |
| 2688 | |
| 2689 | |
| 2690 | /** @constructor */ |
| 2691 | function MutationObserverInit() {} |
| 2692 | |
| 2693 | /** @type {boolean} */ |
| 2694 | MutationObserverInit.prototype.childList; |
| 2695 | |
| 2696 | /** @type {boolean} */ |
| 2697 | MutationObserverInit.prototype.attributes; |
| 2698 | |
| 2699 | /** @type {boolean} */ |
| 2700 | MutationObserverInit.prototype.characterData; |
| 2701 | |
| 2702 | /** @type {boolean} */ |
| 2703 | MutationObserverInit.prototype.subtree; |
| 2704 | |
| 2705 | /** @type {boolean} */ |
| 2706 | MutationObserverInit.prototype.attributeOldValue; |
| 2707 | |
| 2708 | /** @type {boolean} */ |
| 2709 | MutationObserverInit.prototype.characterDataOldValue; |
| 2710 | |
| 2711 | /** @type {Array.<string>} */ |
| 2712 | MutationObserverInit.prototype.attributeFilter; |
| 2713 | |
| 2714 | |
| 2715 | /** @constructor */ |
| 2716 | function MutationRecord() {} |
| 2717 | |
| 2718 | /** @type {string} */ |
| 2719 | MutationRecord.prototype.type; |
| 2720 | |
| 2721 | /** @type {Node} */ |
| 2722 | MutationRecord.prototype.target; |
| 2723 | |
| 2724 | /** @type {NodeList} */ |
| 2725 | MutationRecord.prototype.addedNodes; |
| 2726 | |
| 2727 | /** @type {NodeList} */ |
| 2728 | MutationRecord.prototype.removedNodes; |
| 2729 | |
| 2730 | /** @type {Node} */ |
| 2731 | MutationRecord.prototype.previouSibling; |
| 2732 | |
| 2733 | /** @type {Node} */ |
| 2734 | MutationRecord.prototype.nextSibling; |
| 2735 | |
| 2736 | /** @type {?string} */ |
| 2737 | MutationRecord.prototype.attributeName; |
| 2738 | |
| 2739 | /** @type {?string} */ |
| 2740 | MutationRecord.prototype.attributeNamespace; |
| 2741 | |
| 2742 | /** @type {?string} */ |
| 2743 | MutationRecord.prototype.oldValue; |
| 2744 | |
| 2745 | |
| 2746 | /** |
| 2747 | * @see http://www.w3.org/TR/domcore/#mutation-observers |
| 2748 | * @param {function(Array.<MutationRecord>)} callback |
| 2749 | * @constructor |
| 2750 | */ |
| 2751 | function MutationObserver(callback) {} |
| 2752 | |
| 2753 | /** |
| 2754 | * @param {Node} target |
| 2755 | * @param {MutationObserverInit=} options |
| 2756 | */ |
| 2757 | MutationObserver.prototype.observe = function(target, options) {}; |
| 2758 | |
| 2759 | MutationObserver.prototype.disconnect = function() {}; |
| 2760 | |
| 2761 | /** |
| 2762 | * @type {function(new:MutationObserver, function(Array.<MutationRecord>))} |
| 2763 | */ |
| 2764 | Window.prototype.MutationObserver; |
| 2765 | |
| 2766 | /** |
| 2767 | * @type {function(new:MutationObserver, function(Array.<MutationRecord>))} |
| 2768 | */ |
| 2769 | Window.prototype.WebKitMutationObserver; |
| 2770 | |
| 2771 | /** |
| 2772 | * @type {function(new:MutationObserver, function(Array.<MutationRecord>))} |
| 2773 | */ |
| 2774 | Window.prototype.MozMutationObserver; |