es3.js (63336B)
1 /* 2 * Copyright 2008 The 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 /** 18 * @fileoverview ECMAScript 3 Built-Ins. This include common extensions so this 19 * is actually ES3+Reality. 20 * @externs 21 * @author stevey@google.com (Steve Yegge) 22 * @author nicksantos@google.com (Nick Santos) 23 * @author arv@google.com (Erik Arvidsson) 24 * @author johnlenz@google.com (John Lenz) 25 */ 26 27 28 // These built-ins are still needed for compilation. 29 30 /** 31 * @constructor 32 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Functions_and_function_scope/arguments 33 */ 34 function Arguments() {} 35 36 /** 37 * @type {Function} 38 * @see http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Functions_and_function_scope/arguments/callee 39 */ 40 Arguments.prototype.callee; 41 42 /** 43 * Use the non-standard {@see Function.prototype.caller} property of a function 44 * object instead. 45 * @type {Function} 46 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Functions/arguments/caller 47 * @deprecated 48 */ 49 Arguments.prototype.caller; 50 51 /** 52 * @type {number} 53 * @see http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Functions_and_function_scope/arguments/length 54 */ 55 Arguments.prototype.length; 56 57 /** 58 * @type {!Arguments} 59 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Functions_and_function_scope/arguments 60 */ 61 var arguments; 62 63 /** 64 * @type {number} 65 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Properties/Infinity 66 * @const 67 */ 68 var Infinity; 69 70 /** 71 * @type {number} 72 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Properties/NaN 73 * @const 74 */ 75 var NaN; 76 77 /** 78 * @type {undefined} 79 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Properties/undefined 80 * @const 81 */ 82 var undefined; 83 84 /** 85 * @param {string} uri 86 * @return {string} 87 * @nosideeffects 88 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/decodeURI 89 */ 90 function decodeURI(uri) {} 91 92 /** 93 * @param {string} uri 94 * @return {string} 95 * @nosideeffects 96 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/decodeURIComponent 97 */ 98 function decodeURIComponent(uri) {} 99 100 /** 101 * @param {string} uri 102 * @return {string} 103 * @nosideeffects 104 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/encodeURI 105 */ 106 function encodeURI(uri) {} 107 108 /** 109 * @param {string} uri 110 * @return {string} 111 * @nosideeffects 112 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/encodeURIComponent 113 */ 114 function encodeURIComponent(uri) {} 115 116 /** 117 * Should only be used in browsers where encode/decodeURIComponent 118 * are not present, as the latter handle fancy Unicode characters. 119 * @param {string} str 120 * @return {string} 121 * @nosideeffects 122 * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Predefined_Functions/escape_and_unescape_Functions 123 */ 124 function escape(str) {} 125 126 /** 127 * Should only be used in browsers where encode/decodeURIComponent 128 * are not present, as the latter handle fancy Unicode characters. 129 * @param {string} str 130 * @return {string} 131 * @nosideeffects 132 * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Predefined_Functions/escape_and_unescape_Functions 133 */ 134 function unescape(str) {} 135 136 /** 137 * @param {*} num 138 * @return {boolean} 139 * @nosideeffects 140 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/isFinite 141 */ 142 function isFinite(num) {} 143 144 /** 145 * @param {*} num 146 * @return {boolean} 147 * @nosideeffects 148 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/isNaN 149 */ 150 function isNaN(num) {} 151 152 /** 153 * @param {*} num 154 * @return {number} 155 * @nosideeffects 156 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/parseFloat 157 */ 158 function parseFloat(num) {} 159 160 /** 161 * Parse an integer. Use of {@code parseInt} without {@code base} is strictly 162 * banned in Google. If you really want to parse octal or hex based on the 163 * leader, then pass {@code undefined} as the base. 164 * 165 * @param {*} num 166 * @param {number|undefined} base 167 * @return {number} 168 * @nosideeffects 169 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/parseInt 170 */ 171 function parseInt(num, base) {} 172 173 /** 174 * @param {string} code 175 * @return {*} 176 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/eval 177 */ 178 function eval(code) {} 179 180 /** 181 * @constructor 182 * @param {*=} opt_value 183 * @return {!Object} 184 * @nosideeffects 185 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object 186 */ 187 function Object(opt_value) {} 188 189 /** 190 * The constructor of the current object. 191 * @type {Function} 192 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/constructor 193 */ 194 Object.prototype.constructor = function() {}; 195 196 /** 197 * Binds an object's property to a function to be called when that property is 198 * looked up. 199 * Mozilla-only. 200 * 201 * @param {string} sprop 202 * @param {Function} fun 203 * @modifies {this} 204 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/defineGetter 205 */ 206 Object.prototype.__defineGetter__ = function(sprop, fun) {}; 207 208 /** 209 * Binds an object's property to a function to be called when an attempt is made 210 * to set that property. 211 * Mozilla-only. 212 * 213 * @param {string} sprop 214 * @param {Function} fun 215 * @modifies {this} 216 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/defineSetter 217 */ 218 Object.prototype.__defineSetter__ = function(sprop, fun) {}; 219 220 /** 221 * Returns whether the object has a property with the specified name. 222 * 223 * @param {*} propertyName Implicitly cast to a string. 224 * @return {boolean} 225 * @nosideeffects 226 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/hasOwnProperty 227 */ 228 Object.prototype.hasOwnProperty = function(propertyName) {}; 229 230 /** 231 * Returns whether an object exists in another object's prototype chain. 232 * 233 * @param {Object} other 234 * @return {boolean} 235 * @nosideeffects 236 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/isPrototypeOf 237 */ 238 Object.prototype.isPrototypeOf = function(other) {}; 239 240 /** 241 * Return the function bound as a getter to the specified property. 242 * Mozilla-only. 243 * 244 * @param {string} sprop a string containing the name of the property whose 245 * getter should be returned 246 * @return {Function} 247 * @nosideeffects 248 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/lookupGetter 249 */ 250 Object.prototype.__lookupGetter__ = function(sprop) {}; 251 252 /** 253 * Return the function bound as a setter to the specified property. 254 * Mozilla-only. 255 * 256 * @param {string} sprop a string containing the name of the property whose 257 * setter should be returned. 258 * @return {Function} 259 * @nosideeffects 260 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/lookupSetter 261 */ 262 Object.prototype.__lookupSetter__ = function(sprop) {}; 263 264 /** 265 * Executes a function when a non-existent method is called on an object. 266 * Mozilla-only. 267 * 268 * @param {Function} fun 269 * @return {*} 270 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/noSuchMethod 271 */ 272 Object.prototype.__noSuchMethod__ = function(fun) {}; 273 274 /** 275 * Points to an object's context. For top-level objects, this is the e.g. window. 276 * Mozilla-only. 277 * 278 * @type {Object} 279 * @deprecated 280 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/parent 281 */ 282 Object.prototype.__parent__; 283 284 /** 285 * Points to the object which was used as prototype when the object was instantiated. 286 * Mozilla-only. 287 * 288 * Will be null on Object.prototype. 289 * 290 * @type {Object} 291 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/proto 292 */ 293 Object.prototype.__proto__; 294 295 /** 296 * Determine whether the specified property in an object can be enumerated by a 297 * for..in loop, with the exception of properties inherited through the 298 * prototype chain. 299 * 300 * @param {string} propertyName 301 * @return {boolean} 302 * @nosideeffects 303 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/propertyIsEnumerable 304 */ 305 Object.prototype.propertyIsEnumerable = function(propertyName) {}; 306 307 /** 308 * Returns a localized string representing the object. 309 * @return {string} 310 * @nosideeffects 311 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/toLocaleString 312 */ 313 Object.prototype.toLocaleString = function() {}; 314 315 /** 316 * Returns a string representing the source code of the object. 317 * Mozilla-only. 318 * @return {string} 319 * @nosideeffects 320 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/toSource 321 */ 322 Object.prototype.toSource = function() {}; 323 324 /** 325 * Returns a string representing the object. 326 * @this {*} 327 * @return {string} 328 * @nosideeffects 329 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/toString 330 */ 331 Object.prototype.toString = function() {}; 332 333 /** 334 * Removes a watchpoint set with the {@see Object.prototype.watch} method. 335 * Mozilla-only. 336 * @param {string} prop The name of a property of the object. 337 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/unwatch 338 */ 339 Object.prototype.unwatch = function(prop) {}; 340 341 /** 342 * Returns the object's {@code this} value. 343 * @return {*} 344 * @nosideeffects 345 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/valueOf 346 */ 347 Object.prototype.valueOf = function() {}; 348 349 /** 350 * Sets a watchpoint method. 351 * Mozilla-only. 352 * @param {string} prop The name of a property of the object. 353 * @param {Function} handler A function to call. 354 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/watch 355 */ 356 Object.prototype.watch = function(prop, handler) {}; 357 358 359 /** 360 * @constructor 361 * @param {...*} var_args 362 * @nosideeffects 363 * @throws {Error} 364 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function 365 */ 366 function Function(var_args) {} 367 368 /** 369 * @param {...*} var_args 370 * @return {*} 371 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/call 372 */ 373 Function.prototype.call = function(var_args) {}; 374 375 /** 376 * @param {...*} var_args 377 * @return {*} 378 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/apply 379 */ 380 Function.prototype.apply = function(var_args) {}; 381 382 Function.prototype.arguments; 383 384 /** 385 * @type {number} 386 * @deprecated 387 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/arity 388 */ 389 Function.prototype.arity; 390 391 /** 392 * Nonstandard; Mozilla and JScript only. 393 * @type {Function} 394 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/caller 395 */ 396 Function.prototype.caller; 397 398 /** 399 * Nonstandard. 400 * @type {?} 401 * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/displayName 402 */ 403 Function.prototype.displayName; 404 405 /** 406 * Expected number of arguments. 407 * @type {number} 408 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/length 409 */ 410 Function.prototype.length; 411 412 /** 413 * @type {string} 414 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/name 415 */ 416 Function.prototype.name; 417 418 /** 419 * @this {Function} 420 * @return {string} 421 * @nosideeffects 422 * @override 423 */ 424 Function.prototype.toString = function() {}; 425 426 427 /** 428 * @constructor 429 * @param {...*} var_args 430 * @return {!Array.<?>} 431 * @nosideeffects 432 * @template T 433 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array 434 */ 435 function Array(var_args) {} 436 437 // Functions: 438 439 /** 440 * Returns a new array comprised of this array joined with other array(s) 441 * and/or value(s). 442 * 443 * @param {...*} var_args 444 * @return {!Array.<?>} 445 * @this {*} 446 * @nosideeffects 447 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/concat 448 */ 449 Array.prototype.concat = function(var_args) {}; 450 451 /** 452 * Joins all elements of an array into a string. 453 * 454 * @param {*=} opt_separator Specifies a string to separate each element of the 455 * array. The separator is converted to a string if necessary. If omitted, 456 * the array elements are separated with a comma. 457 * @return {string} 458 * @this {{length: number}|string} 459 * @nosideeffects 460 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/join 461 */ 462 Array.prototype.join = function(opt_separator) {}; 463 464 /** 465 * Removes the last element from an array and returns that element. 466 * 467 * @return {T} 468 * @this {{length: number}|Array.<T>} 469 * @modifies {this} 470 * @template T 471 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/pop 472 */ 473 Array.prototype.pop = function() {}; 474 475 /** 476 * Mutates an array by appending the given elements and returning the new 477 * length of the array. 478 * 479 * @param {...T} var_args 480 * @return {number} The new length of the array. 481 * @this {{length: number}|Array.<T>} 482 * @template T 483 * @modifies {this} 484 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/push 485 */ 486 Array.prototype.push = function(var_args) {}; 487 488 /** 489 * Transposes the elements of an array in place: the first array element becomes the 490 * last and the last becomes the first. 491 * 492 * @this {{length: number}} 493 * @modifies {this} 494 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/reverse 495 */ 496 Array.prototype.reverse = function() {}; 497 498 /** 499 * Removes the first element from an array and returns that element. This 500 * method changes the length of the array. 501 * 502 * @this {{length: number}|Array.<T>} 503 * @modifies {this} 504 * @return {T} 505 * @template T 506 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/shift 507 */ 508 Array.prototype.shift = function() {}; 509 510 /** 511 * Extracts a section of an array and returns a new array. 512 * 513 * @param {*=} opt_begin Zero-based index at which to begin extraction. A 514 * non-number type will be auto-cast by the browser to a number. 515 * @param {*=} opt_end Zero-based index at which to end extraction. slice 516 * extracts up to but not including end. 517 * @return {!Array.<T>} 518 * @this {{length: number}|Array.<T>|string} 519 * @template T 520 * @nosideeffects 521 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/slice 522 */ 523 Array.prototype.slice = function(opt_begin, opt_end) {}; 524 525 /** 526 * Sorts the elements of an array in place. 527 * 528 * @param {function(T,T):number=} opt_compareFunction Specifies a function that 529 * defines the sort order. 530 * @this {{length: number}|Array.<T>} 531 * @template T 532 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/sort 533 */ 534 Array.prototype.sort = function(opt_compareFunction) {}; 535 536 /** 537 * Changes the content of an array, adding new elements while removing old 538 * elements. 539 * 540 * @param {*=} opt_index Index at which to start changing the array. If negative, 541 * will begin that many elements from the end. A non-number type will be 542 * auto-cast by the browser to a number. 543 * @param {*=} opt_howMany An integer indicating the number of old array elements 544 * to remove. 545 * @param {...T} var_args 546 * @return {!Array.<T>} 547 * @this {{length: number}|Array.<T>} 548 * @modifies {this} 549 * @template T 550 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/splice 551 */ 552 Array.prototype.splice = function(opt_index, opt_howMany, var_args) {}; 553 554 /** 555 * @return {string} 556 * @this {Object} 557 * @nosideeffects 558 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/toSource 559 */ 560 Array.prototype.toSource; 561 562 /** 563 * @this {Array.<?>} 564 * @return {string} 565 * @nosideeffects 566 * @override 567 */ 568 Array.prototype.toString = function() {}; 569 570 /** 571 * Adds one or more elements to the beginning of an array and returns the new 572 * length of the array. 573 * 574 * @param {...*} var_args 575 * @return {number} The new length of the array 576 * @this {{length: number}} 577 * @modifies {this} 578 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/unshift 579 */ 580 Array.prototype.unshift = function(var_args) {}; 581 582 /** 583 * Apply a function simultaneously against two values of the array (from 584 * left-to-right) as to reduce it to a single value. 585 * 586 * @param {?function(?, T, number, !Array.<T>) : R} callback 587 * @param {*=} opt_initialValue 588 * @return {R} 589 * @this {{length: number}|Array.<T>|string} 590 * @template T,R 591 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/reduce 592 */ 593 Array.prototype.reduce = function(callback, opt_initialValue) {}; 594 595 /** 596 * Apply a function simultaneously against two values of the array (from 597 * right-to-left) as to reduce it to a single value. 598 * 599 * @param {?function(?, T, number, !Array.<T>) : R} callback 600 * @param {*=} opt_initialValue 601 * @return {R} 602 * @this {{length: number}|Array.<T>|string} 603 * @template T,R 604 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/reduceRight 605 */ 606 Array.prototype.reduceRight = function(callback, opt_initialValue) {}; 607 608 /** 609 * Available in ECMAScript 5, Mozilla 1.6+. 610 * @param {?function(this:S, T, number, !Array.<T>): ?} callback 611 * @param {S=} opt_thisobj 612 * @return {boolean} 613 * @this {{length: number}|Array.<T>|string} 614 * @template T,S 615 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/every 616 */ 617 Array.prototype.every = function(callback, opt_thisobj) {}; 618 619 /** 620 * Available in ECMAScript 5, Mozilla 1.6+. 621 * @param {?function(this:S, T, number, !Array.<T>): ?} callback 622 * @param {S=} opt_thisobj 623 * @return {!Array.<T>} 624 * @this {{length: number}|Array.<T>|string} 625 * @template T,S 626 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter 627 */ 628 Array.prototype.filter = function(callback, opt_thisobj) {}; 629 630 /** 631 * Available in ECMAScript 5, Mozilla 1.6+. 632 * @param {?function(this:S, T, number, !Array.<T>): ?} callback 633 * @param {S=} opt_thisobj 634 * @this {{length: number}|Array.<T>|string} 635 * @template T,S 636 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/forEach 637 */ 638 Array.prototype.forEach = function(callback, opt_thisobj) {}; 639 640 /** 641 * Available in ECMAScript 5, Mozilla 1.6+. 642 * @param {T} obj 643 * @param {number=} opt_fromIndex 644 * @return {number} 645 * @this {{length: number}|Array.<T>|string} 646 * @nosideeffects 647 * @template T 648 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/indexOf 649 */ 650 Array.prototype.indexOf = function(obj, opt_fromIndex) {}; 651 652 /** 653 * Available in ECMAScript 5, Mozilla 1.6+. 654 * @param {T} obj 655 * @param {number=} opt_fromIndex 656 * @return {number} 657 * @this {{length: number}|Array.<T>|string} 658 * @nosideeffects 659 * @template T 660 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/lastIndexOf 661 */ 662 Array.prototype.lastIndexOf = function(obj, opt_fromIndex) {}; 663 664 /** 665 * Available in ECMAScript 5, Mozilla 1.6+. 666 * @param {?function(this:S, T, number, !Array.<T>): R} callback 667 * @param {S=} opt_thisobj 668 * @return {!Array.<R>} 669 * @this {{length: number}|Array.<T>|string} 670 * @template T,S,R 671 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/map 672 */ 673 Array.prototype.map = function(callback, opt_thisobj) {}; 674 675 /** 676 * Available in ECMAScript 5, Mozilla 1.6+. 677 * @param {?function(this:S, T, number, !Array.<T>): ?} callback 678 * @param {S=} opt_thisobj 679 * @return {boolean} 680 * @this {{length: number}|Array.<T>|string} 681 * @template T,S 682 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/some 683 */ 684 Array.prototype.some = function(callback, opt_thisobj) {}; 685 686 /** 687 * @type {number} 688 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/index 689 */ 690 Array.prototype.index; 691 692 /** 693 * @type {?string} 694 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/input 695 */ 696 Array.prototype.input; 697 698 /** 699 * @type {number} 700 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/length 701 */ 702 Array.prototype.length; 703 704 /** 705 * @param {{length: number}|Array.<T>} arr 706 * @param {?function(this:S, T, number, ?) : ?} callback 707 * @param {S=} opt_context 708 * @return {boolean} 709 * @template T,S 710 */ 711 Array.every = function(arr, callback, opt_context) {}; 712 713 /** 714 * @param {{length: number}|Array.<T>} arr 715 * @param {?function(this:S, T, number, ?) : ?} callback 716 * @param {S=} opt_context 717 * @return {!Array.<T>} 718 * @template T,S 719 */ 720 Array.filter = function(arr, callback, opt_context) {}; 721 722 /** 723 * @param {{length: number}|Array.<T>} arr 724 * @param {?function(this:S, T, number, ?) : ?} callback 725 * @param {S=} opt_context 726 * @template T,S 727 */ 728 Array.forEach = function(arr, callback, opt_context) {}; 729 730 /** 731 * Mozilla 1.6+ only. 732 * @param {{length: number}|Array.<T>} arr 733 * @param {T} obj 734 * @param {number=} opt_fromIndex 735 * @return {number} 736 * @template T 737 * @nosideeffects 738 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/indexOf 739 */ 740 Array.indexOf = function(arr, obj, opt_fromIndex) {}; 741 742 /** 743 * Mozilla 1.6+ only. 744 * @param {{length: number}|Array.<T>} arr 745 * @param {T} obj 746 * @param {number=} opt_fromIndex 747 * @return {number} 748 * @template T 749 * @nosideeffects 750 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/lastIndexOf 751 */ 752 Array.lastIndexOf = function(arr, obj, opt_fromIndex) {}; 753 754 /** 755 * @param {{length: number}|Array.<T>} arr 756 * @param {?function(this:S, T, number, !Array.<T>): R} callback 757 * @param {S=} opt_context 758 * @return {!Array.<R>} 759 * @template T,S,R 760 */ 761 Array.map = function(arr, callback, opt_context) {}; 762 763 /** 764 * @param {{length: number}|Array.<T>} arr 765 * @param {?function(this:S, T, number, ?) : ?} callback 766 * @param {S=} opt_context 767 * @return {boolean} 768 * @template T,S 769 */ 770 Array.some = function(arr, callback, opt_context) {}; 771 772 /** 773 * Introduced in 1.8.5. 774 * @param {*} arr 775 * @return {boolean} 776 * @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray 777 */ 778 Array.isArray = function(arr) {}; 779 780 /** 781 * @constructor 782 * @param {*=} opt_value 783 * @return {boolean} 784 * @nosideeffects 785 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean 786 */ 787 function Boolean(opt_value) {} 788 789 /** 790 * @return {string} 791 * @nosideeffects 792 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean/toSource 793 * @override 794 */ 795 Boolean.prototype.toSource = function() {}; 796 797 /** 798 * @this {boolean|Boolean} 799 * @return {string} 800 * @nosideeffects 801 * @override 802 */ 803 Boolean.prototype.toString = function() {}; 804 805 /** 806 * @constructor 807 * @param {*=} opt_value 808 * @return {number} 809 * @nosideeffects 810 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number 811 */ 812 function Number(opt_value) {} 813 814 /** 815 * @this {Number|number} 816 * @param {number=} opt_fractionDigits 817 * @return {string} 818 * @nosideeffects 819 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/toExponential 820 */ 821 Number.prototype.toExponential = function(opt_fractionDigits) {}; 822 823 /** 824 * @this {Number|number} 825 * @param {*=} opt_digits 826 * @return {string} 827 * @nosideeffects 828 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/toFixed 829 */ 830 Number.prototype.toFixed = function(opt_digits) {}; 831 832 /** 833 * @this {Number|number} 834 * @param {number=} opt_precision 835 * @return {string} 836 * @nosideeffects 837 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/toPrecision 838 */ 839 Number.prototype.toPrecision = function(opt_precision) {}; 840 841 /** 842 * Returns a string representing the number. 843 * @this {Number|number} 844 * @param {(number|Number)=} opt_radix An optional radix. 845 * @return {string} 846 * @nosideeffects 847 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/toString 848 * @override 849 */ 850 Number.prototype.toString = function(opt_radix) {}; 851 852 // Properties. 853 /** 854 * @type {number} 855 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/MAX_VALUE 856 */ 857 Number.MAX_VALUE; 858 859 /** 860 * @type {number} 861 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/MIN_VALUE 862 */ 863 Number.MIN_VALUE; 864 865 /** 866 * @type {number} 867 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/NaN 868 */ 869 Number.NaN; 870 871 /** 872 * @type {number} 873 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/NEGATIVE_INFINITY 874 */ 875 Number.NEGATIVE_INFINITY; 876 877 /** 878 * @type {number} 879 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/POSITIVE_INFINITY 880 */ 881 Number.POSITIVE_INFINITY; 882 883 884 /** 885 * @const 886 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math 887 */ 888 var Math = {}; 889 890 /** 891 * @param {*} x 892 * @return {number} 893 * @nosideeffects 894 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/abs 895 */ 896 Math.abs = function(x) {}; 897 898 /** 899 * @param {*} x 900 * @return {number} 901 * @nosideeffects 902 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/acos 903 */ 904 Math.acos = function(x) {}; 905 906 /** 907 * @param {*} x 908 * @return {number} 909 * @nosideeffects 910 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/asin 911 */ 912 Math.asin = function(x) {}; 913 914 /** 915 * @param {*} x 916 * @return {number} 917 * @nosideeffects 918 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/atan 919 */ 920 Math.atan = function(x) {}; 921 922 /** 923 * @param {*} y 924 * @param {*} x 925 * @return {number} 926 * @nosideeffects 927 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/atan2 928 */ 929 Math.atan2 = function(y, x) {}; 930 931 /** 932 * @param {*} x 933 * @return {number} 934 * @nosideeffects 935 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/ceil 936 */ 937 Math.ceil = function(x) {}; 938 939 /** 940 * @param {*} x 941 * @return {number} 942 * @nosideeffects 943 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/cos 944 */ 945 Math.cos = function(x) {}; 946 947 /** 948 * @param {*} x 949 * @return {number} 950 * @nosideeffects 951 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/exp 952 */ 953 Math.exp = function(x) {}; 954 955 /** 956 * @param {*} x 957 * @return {number} 958 * @nosideeffects 959 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/floor 960 */ 961 Math.floor = function(x) {}; 962 963 /** 964 * @param {*} x 965 * @return {number} 966 * @nosideeffects 967 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/log 968 */ 969 Math.log = function(x) {}; 970 971 /** 972 * @param {...*} var_args 973 * @return {number} 974 * @nosideeffects 975 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/max 976 */ 977 Math.max = function(var_args) {}; 978 979 /** 980 * @param {...*} var_args 981 * @return {number} 982 * @nosideeffects 983 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/min 984 */ 985 Math.min = function(var_args) {}; 986 987 /** 988 * @param {*} x 989 * @param {*} y 990 * @return {number} 991 * @nosideeffects 992 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/pow 993 */ 994 Math.pow = function(x, y) {}; 995 996 /** 997 * @return {number} 998 * @nosideeffects 999 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/random 1000 */ 1001 Math.random = function() {}; 1002 1003 /** 1004 * @param {*} x 1005 * @return {number} 1006 * @nosideeffects 1007 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/round 1008 */ 1009 Math.round = function(x) {}; 1010 1011 /** 1012 * @param {*} x 1013 * @return {number} 1014 * @nosideeffects 1015 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/sin 1016 */ 1017 Math.sin = function(x) {}; 1018 1019 /** 1020 * @param {*} x 1021 * @return {number} 1022 * @nosideeffects 1023 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/sqrt 1024 */ 1025 Math.sqrt = function(x) {}; 1026 1027 /** 1028 * @param {*} x 1029 * @return {number} 1030 * @nosideeffects 1031 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/tan 1032 */ 1033 Math.tan = function(x) {}; 1034 1035 /** 1036 * @return {string} 1037 * @nosideeffects 1038 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/toSource 1039 */ 1040 Math.toSource = function() {}; 1041 1042 // Properties: 1043 1044 /** 1045 * @type {number} 1046 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/E 1047 */ 1048 Math.E; 1049 1050 /** 1051 * @type {number} 1052 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/LN2 1053 */ 1054 Math.LN2; 1055 1056 /** 1057 * @type {number} 1058 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/LN10 1059 */ 1060 Math.LN10; 1061 1062 /** 1063 * @type {number} 1064 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/LOG2E 1065 */ 1066 Math.LOG2E; 1067 1068 /** 1069 * @type {number} 1070 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/LOG10E 1071 */ 1072 Math.LOG10E; 1073 1074 /** 1075 * @type {number} 1076 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/PI 1077 */ 1078 Math.PI; 1079 1080 /** 1081 * @type {number} 1082 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/SQRT1_2 1083 */ 1084 Math.SQRT1_2; 1085 1086 /** 1087 * @type {number} 1088 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/SQRT2 1089 */ 1090 Math.SQRT2; 1091 1092 1093 /** 1094 * @param {?=} opt_yr_num 1095 * @param {?=} opt_mo_num 1096 * @param {?=} opt_day_num 1097 * @param {?=} opt_hr_num 1098 * @param {?=} opt_min_num 1099 * @param {?=} opt_sec_num 1100 * @param {?=} opt_ms_num 1101 * @constructor 1102 * @return {string} 1103 * @nosideeffects 1104 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date 1105 */ 1106 function Date(opt_yr_num, opt_mo_num, opt_day_num, opt_hr_num, opt_min_num, 1107 opt_sec_num, opt_ms_num) {} 1108 1109 /** 1110 * @return {number} 1111 * @nosideeffects 1112 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/now 1113 */ 1114 Date.now = function() {}; 1115 1116 /** 1117 * Parses a string representation of a date, and returns the number 1118 * of milliseconds since January 1, 1970, 00:00:00, local time. 1119 * @param {*} date 1120 * @return {number} 1121 * @nosideeffects 1122 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/parse 1123 */ 1124 Date.parse = function(date) {}; 1125 1126 /** 1127 * @param {number} year 1128 * @param {number} month 1129 * @param {number=} opt_date 1130 * @param {number=} opt_hours 1131 * @param {number=} opt_minute 1132 * @param {number=} opt_second 1133 * @param {number=} opt_ms 1134 * @return {number} 1135 * @nosideeffects 1136 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/UTC 1137 */ 1138 Date.UTC = function(year, month, 1139 opt_date, opt_hours, opt_minute, opt_second, opt_ms) {}; 1140 1141 /** 1142 * @return {number} 1143 * @nosideeffects 1144 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getDate 1145 */ 1146 Date.prototype.getDate = function() {}; 1147 1148 /** 1149 * @return {number} 1150 * @nosideeffects 1151 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getDay 1152 */ 1153 Date.prototype.getDay = function() {}; 1154 1155 /** 1156 * @return {number} 1157 * @nosideeffects 1158 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getMonth 1159 */ 1160 Date.prototype.getMonth = function() {}; 1161 1162 /** 1163 * @return {number} 1164 * @nosideeffects 1165 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getFullYear 1166 */ 1167 Date.prototype.getFullYear = function() {}; 1168 1169 /** 1170 * @return {number} 1171 * @nosideeffects 1172 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getYear 1173 */ 1174 Date.prototype.getYear = function() {}; 1175 1176 /** 1177 * @return {number} 1178 * @nosideeffects 1179 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getHours 1180 */ 1181 Date.prototype.getHours = function() {}; 1182 1183 /** 1184 * @return {number} 1185 * @nosideeffects 1186 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getMinutes 1187 */ 1188 Date.prototype.getMinutes = function() {}; 1189 1190 /** 1191 * @return {number} 1192 * @nosideeffects 1193 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getSeconds 1194 */ 1195 Date.prototype.getSeconds = function() {}; 1196 1197 /** 1198 * @return {number} 1199 * @nosideeffects 1200 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getMilliseconds 1201 */ 1202 Date.prototype.getMilliseconds = function() {}; 1203 1204 /** 1205 * @return {number} 1206 * @nosideeffects 1207 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getTime 1208 */ 1209 Date.prototype.getTime = function() {}; 1210 1211 /** 1212 * @return {number} 1213 * @nosideeffects 1214 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getTimezoneOffset 1215 */ 1216 Date.prototype.getTimezoneOffset = function() {}; 1217 1218 /** 1219 * @return {number} 1220 * @nosideeffects 1221 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getUTCDate 1222 */ 1223 Date.prototype.getUTCDate = function() {}; 1224 1225 /** 1226 * @return {number} 1227 * @nosideeffects 1228 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getUTCDay 1229 */ 1230 Date.prototype.getUTCDay = function() {}; 1231 1232 /** 1233 * @return {number} 1234 * @nosideeffects 1235 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getUTCMonth 1236 */ 1237 Date.prototype.getUTCMonth = function() {}; 1238 1239 /** 1240 * @return {number} 1241 * @nosideeffects 1242 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getUTCFullYear 1243 */ 1244 Date.prototype.getUTCFullYear = function() {}; 1245 1246 /** 1247 * @return {number} 1248 * @nosideeffects 1249 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getUTCHours 1250 */ 1251 Date.prototype.getUTCHours = function() {}; 1252 1253 /** 1254 * @return {number} 1255 * @nosideeffects 1256 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getUTCMinutes 1257 */ 1258 Date.prototype.getUTCMinutes = function() {}; 1259 1260 /** 1261 * @return {number} 1262 * @nosideeffects 1263 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getUTCSeconds 1264 */ 1265 Date.prototype.getUTCSeconds = function() {}; 1266 1267 /** 1268 * @return {number} 1269 * @nosideeffects 1270 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getUTCMilliseconds 1271 */ 1272 Date.prototype.getUTCMilliseconds = function() {}; 1273 1274 /** 1275 * Sets the day of the month for a specified date according to local time. 1276 * 1277 * @param {number} dayValue 1278 * @modifies {this} 1279 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setDate 1280 */ 1281 Date.prototype.setDate = function(dayValue) {}; 1282 1283 /** 1284 * Set the month for a specified date according to local time. 1285 * 1286 * @param {number} monthValue 1287 * @param {number=} opt_dayValue 1288 * @modifies {this} 1289 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setMonth 1290 */ 1291 Date.prototype.setMonth = function(monthValue, opt_dayValue) {}; 1292 1293 /** 1294 * Sets the full year for a specified date according to local time. 1295 * 1296 * @param {number} yearValue 1297 * @param {number=} opt_monthValue 1298 * @param {number=} opt_dayValue 1299 * @modifies {this} 1300 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setFullYear 1301 */ 1302 Date.prototype.setFullYear = 1303 function(yearValue, opt_monthValue, opt_dayValue) {}; 1304 1305 /** 1306 * Sets the year for a specified date according to local time. 1307 * 1308 * @param {number} yearValue 1309 * @deprecated 1310 * @modifies {this} 1311 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setYear 1312 */ 1313 Date.prototype.setYear = function(yearValue) {}; 1314 1315 /** 1316 * Sets the hours for a specified date according to local time. 1317 * 1318 * @param {number} hoursValue 1319 * @param {number=} opt_minutesValue 1320 * @param {number=} opt_secondsValue 1321 * @param {number=} opt_msValue 1322 * @modifies {this} 1323 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setHours 1324 */ 1325 Date.prototype.setHours = function(hoursValue, opt_minutesValue, 1326 opt_secondsValue, opt_msValue) {}; 1327 1328 /** 1329 * Sets the minutes for a specified date according to local time. 1330 * 1331 * @param {number} minutesValue 1332 * @param {number=} opt_secondsValue 1333 * @param {number=} opt_msValue 1334 * @modifies {this} 1335 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setMinutes 1336 */ 1337 Date.prototype.setMinutes = 1338 function(minutesValue, opt_secondsValue, opt_msValue) {}; 1339 1340 /** 1341 * Sets the seconds for a specified date according to local time. 1342 * 1343 * @param {number} secondsValue 1344 * @param {number=} opt_msValue 1345 * @modifies {this} 1346 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setSeconds 1347 */ 1348 Date.prototype.setSeconds = function(secondsValue, opt_msValue) {}; 1349 1350 /** 1351 * Sets the milliseconds for a specified date according to local time. 1352 * 1353 * @param {number} millisecondsValue 1354 * @modifies {this} 1355 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setMilliseconds 1356 */ 1357 Date.prototype.setMilliseconds = function(millisecondsValue) {}; 1358 1359 /** 1360 * Sets the Date object to the time represented by a number of milliseconds 1361 * since January 1, 1970, 00:00:00 UTC. 1362 * 1363 * @param {number} timeValue 1364 * @modifies {this} 1365 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setTime 1366 */ 1367 Date.prototype.setTime = function(timeValue) {}; 1368 1369 /** 1370 * Sets the day of the month for a specified date according to universal time. 1371 * 1372 * @param {number} dayValue 1373 * @modifies {this} 1374 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setUTCDate 1375 */ 1376 Date.prototype.setUTCDate = function(dayValue) {}; 1377 1378 /** 1379 * Sets the month for a specified date according to universal time. 1380 * 1381 * @param {number} monthValue 1382 * @param {number=} opt_dayValue 1383 * @modifies {this} 1384 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setUTCMonth 1385 */ 1386 Date.prototype.setUTCMonth = function(monthValue, opt_dayValue) {}; 1387 1388 /** 1389 * Sets the full year for a specified date according to universal time. 1390 * 1391 * @param {number} yearValue 1392 * @param {number=} opt_monthValue 1393 * @param {number=} opt_dayValue 1394 * @modifies {this} 1395 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setUTCFullYear 1396 */ 1397 Date.prototype.setUTCFullYear = function(yearValue, opt_monthValue, 1398 opt_dayValue) {}; 1399 1400 /** 1401 * Sets the hour for a specified date according to universal time. 1402 * 1403 * @param {number} hoursValue 1404 * @param {number=} opt_minutesValue 1405 * @param {number=} opt_secondsValue 1406 * @param {number=} opt_msValue 1407 * @modifies {this} 1408 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setUTCHours 1409 */ 1410 Date.prototype.setUTCHours = function(hoursValue, opt_minutesValue, 1411 opt_secondsValue, opt_msValue) {}; 1412 1413 /** 1414 * Sets the minutes for a specified date according to universal time. 1415 * 1416 * @param {number} minutesValue 1417 * @param {number=} opt_secondsValue 1418 * @param {number=} opt_msValue 1419 * @modifies {this} 1420 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setUTCMinutes 1421 */ 1422 Date.prototype.setUTCMinutes = function(minutesValue, opt_secondsValue, 1423 opt_msValue) {}; 1424 1425 1426 /** 1427 * Sets the seconds for a specified date according to universal time. 1428 * 1429 * @param {number} secondsValue 1430 * @param {number=} opt_msValue 1431 * @modifies {this} 1432 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setUTCSeconds 1433 */ 1434 Date.prototype.setUTCSeconds = function(secondsValue, opt_msValue) {}; 1435 1436 /** 1437 * Sets the milliseconds for a specified date according to universal time. 1438 * 1439 * @param {number} millisecondsValue 1440 * @modifies {this} 1441 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setUTCMilliseconds 1442 */ 1443 Date.prototype.setUTCMilliseconds = function(millisecondsValue) {}; 1444 1445 /** 1446 * @return {string} 1447 * @nosideeffects 1448 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/toSource 1449 * @override 1450 */ 1451 Date.prototype.toSource = function() {}; 1452 1453 /** 1454 * @return {string} 1455 * @nosideeffects 1456 * @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/toDateString 1457 */ 1458 Date.prototype.toDateString = function() {}; 1459 1460 /** 1461 * @return {string} 1462 * @nosideeffects 1463 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/toGMTString 1464 */ 1465 Date.prototype.toGMTString = function() {}; 1466 1467 /** 1468 * @return {string} 1469 * @nosideeffects 1470 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/toTimeString 1471 */ 1472 Date.prototype.toTimeString = function() {}; 1473 1474 /** 1475 * @return {string} 1476 * @nosideeffects 1477 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/toUTCString 1478 */ 1479 Date.prototype.toUTCString = function() {}; 1480 1481 /** 1482 * @param {(string|Array.<string>)=} opt_locales 1483 * @param {Object=} opt_options 1484 * @return {string} 1485 * @nosideeffects 1486 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/toLocaleDateString 1487 */ 1488 Date.prototype.toLocaleDateString = function(opt_locales, opt_options) {}; 1489 1490 /** 1491 * @param {string} formatString 1492 * @return {string} 1493 * @nosideeffects 1494 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/toLocaleFormat 1495 */ 1496 Date.prototype.toLocaleFormat = function(formatString) {}; 1497 1498 /** 1499 * @param {string|Array.<string>=} opt_locales 1500 * @param {Object=} opt_options 1501 * @return {string} 1502 * @nosideeffects 1503 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/toLocaleString 1504 * @see http://www.ecma-international.org/ecma-402/1.0/#sec-13.3.1 1505 * @override 1506 */ 1507 Date.prototype.toLocaleString = function(opt_locales, opt_options) {}; 1508 1509 /** 1510 * @param {(string|Array.<string>)=} opt_locales 1511 * @param {Object=} opt_options 1512 * @return {string} 1513 * @nosideeffects 1514 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/toLocaleTimeString 1515 */ 1516 Date.prototype.toLocaleTimeString = function(opt_locales, opt_options) {}; 1517 1518 /** 1519 * @this {Date} 1520 * @return {string} 1521 * @nosideeffects 1522 * @override 1523 */ 1524 Date.prototype.toString = function() {}; 1525 1526 /** 1527 * @return {number} 1528 * @nosideeffects 1529 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/valueOf 1530 */ 1531 Date.prototype.valueOf; 1532 1533 /** 1534 * @constructor 1535 * @param {*=} opt_str 1536 * @return {string} 1537 * @nosideeffects 1538 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String 1539 */ 1540 function String(opt_str) {} 1541 // Functions: 1542 1543 /** 1544 * @param {...number} var_args 1545 * @return {string} 1546 * @nosideeffects 1547 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/fromCharCode 1548 */ 1549 String.fromCharCode = function(var_args) {}; 1550 1551 /** 1552 * @this {String|string} 1553 * @return {string} 1554 * @nosideeffects 1555 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/anchor 1556 */ 1557 String.prototype.anchor = function() {}; 1558 1559 /** 1560 * @this {String|string} 1561 * @return {string} 1562 * @nosideeffects 1563 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/big 1564 */ 1565 String.prototype.big = function() {}; 1566 1567 /** 1568 * @this {String|string} 1569 * @return {string} 1570 * @nosideeffects 1571 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/blink 1572 */ 1573 String.prototype.blink = function() {}; 1574 1575 /** 1576 * @this {String|string} 1577 * @return {string} 1578 * @nosideeffects 1579 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/bold 1580 */ 1581 String.prototype.bold = function() {}; 1582 1583 /** 1584 * Returns the specified character from a string. 1585 * 1586 * @this {String|string} 1587 * @param {number} index 1588 * @return {string} 1589 * @nosideeffects 1590 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/charAt 1591 */ 1592 String.prototype.charAt = function(index) {}; 1593 1594 /** 1595 * Returns a number indicating the Unicode value of the character at the given 1596 * index. 1597 * 1598 * @this {String|string} 1599 * @param {number=} opt_index 1600 * @return {number} 1601 * @nosideeffects 1602 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/charCodeAt 1603 */ 1604 String.prototype.charCodeAt = function(opt_index) {}; 1605 1606 /** 1607 * Combines the text of two or more strings and returns a new string. 1608 * 1609 * @this {String|string} 1610 * @param {...*} var_args 1611 * @return {string} 1612 * @nosideeffects 1613 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/concat 1614 */ 1615 String.prototype.concat = function(var_args) {}; 1616 1617 /** 1618 * @this {String|string} 1619 * @return {string} 1620 * @nosideeffects 1621 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/fixed 1622 */ 1623 String.prototype.fixed = function() {}; 1624 1625 /** 1626 * @this {String|string} 1627 * @param {string} color 1628 * @return {string} 1629 * @nosideeffects 1630 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/fontcolor 1631 */ 1632 String.prototype.fontcolor = function(color) {}; 1633 1634 /** 1635 * @this {String|string} 1636 * @param {number} size 1637 * @return {string} 1638 * @nosideeffects 1639 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/fontsize 1640 */ 1641 String.prototype.fontsize = function(size) {}; 1642 1643 /** 1644 * Returns the index within the calling String object of the first occurrence 1645 * of the specified value, starting the search at fromIndex, returns -1 if the 1646 * value is not found. 1647 * 1648 * @this {String|string} 1649 * @param {string|null} searchValue 1650 * @param {(number|null)=} opt_fromIndex 1651 * @return {number} 1652 * @nosideeffects 1653 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/indexOf 1654 */ 1655 String.prototype.indexOf = function(searchValue, opt_fromIndex) {}; 1656 1657 /** 1658 * @this {String|string} 1659 * @return {string} 1660 * @nosideeffects 1661 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/italics 1662 */ 1663 String.prototype.italics = function() {}; 1664 1665 /** 1666 * Returns the index within the calling String object of the last occurrence of 1667 * the specified value, or -1 if not found. The calling string is searched 1668 * backward, starting at fromIndex. 1669 * 1670 * @this {String|string} 1671 * @param {string|null} searchValue 1672 * @param {(number|null)=} opt_fromIndex 1673 * @return {number} 1674 * @nosideeffects 1675 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/lastIndexOf 1676 */ 1677 String.prototype.lastIndexOf = function(searchValue, opt_fromIndex) {}; 1678 1679 /** 1680 * @this {String|string} 1681 * @param {string} hrefAttribute 1682 * @return {string} 1683 * @nosideeffects 1684 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/link 1685 */ 1686 String.prototype.link = function(hrefAttribute) {}; 1687 1688 /** 1689 * Returns a number indicating whether a reference string comes before or after 1690 * or is the same as the given string in sort order. 1691 * 1692 * @this {*} 1693 * @param {?string} compareString 1694 * @param {string|Array.<string>=} locales 1695 * @param {Object=} options 1696 * @return {number} 1697 * @nosideeffects 1698 * @see http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/String/localeCompare 1699 * @see http://www.ecma-international.org/ecma-402/1.0/#sec-13.1.1 1700 */ 1701 String.prototype.localeCompare = function(compareString, locales, options) {}; 1702 1703 /** 1704 * Used to retrieve the matches when matching a string against a regular 1705 * expression. 1706 * 1707 * @this {String|string} 1708 * @param {*} regexp 1709 * @return {Array.<string>} This should really return an Array with a few 1710 * special properties, but we do not have a good way to model this in 1711 * our type system. Also see Regexp.prototype.exec. 1712 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/match 1713 */ 1714 String.prototype.match = function(regexp) {}; 1715 1716 /** 1717 * @this {String|string} 1718 * @return {string} 1719 * @nosideeffects 1720 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/quote 1721 */ 1722 String.prototype.quote = function() {}; 1723 1724 /** 1725 * Finds a match between a regular expression and a string, and replaces the 1726 * matched substring with a new substring. 1727 * 1728 * This may have side-effects if the replacement function has side-effects. 1729 * 1730 * @this {String|string} 1731 * @param {RegExp|string} regex 1732 * @param {string|Function} str 1733 * @param {string=} opt_flags 1734 * @return {string} 1735 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replace 1736 */ 1737 String.prototype.replace = function(regex, str, opt_flags) {}; 1738 1739 /** 1740 * Executes the search for a match between a regular expression and this String 1741 * object. 1742 * 1743 * @this {String|string} 1744 * @param {RegExp|string} regexp 1745 * @return {number} 1746 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/search 1747 */ 1748 String.prototype.search = function(regexp) {}; 1749 1750 /** 1751 * @this {String|string} 1752 * @param {number} begin 1753 * @param {number=} opt_end 1754 * @return {string} 1755 * @nosideeffects 1756 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/slice 1757 */ 1758 String.prototype.slice = function(begin, opt_end) {}; 1759 1760 /** 1761 * @this {String|string} 1762 * @return {string} 1763 * @nosideeffects 1764 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/small 1765 */ 1766 String.prototype.small = function() {}; 1767 1768 /** 1769 * @this {String|string} 1770 * @param {*=} opt_separator 1771 * @param {number=} opt_limit 1772 * @return {!Array.<string>} 1773 * @nosideeffects 1774 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/split 1775 */ 1776 String.prototype.split = function(opt_separator, opt_limit) {}; 1777 1778 /** 1779 * @return {string} 1780 * @nosideeffects 1781 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/strike 1782 */ 1783 String.prototype.strike = function() {}; 1784 1785 /** 1786 * @this {String|string} 1787 * @return {string} 1788 * @nosideeffects 1789 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/sub 1790 */ 1791 String.prototype.sub = function() {}; 1792 1793 /** 1794 * @this {String|string} 1795 * @param {number} start 1796 * @param {number=} opt_length 1797 * @return {string} The specified substring. 1798 * @nosideeffects 1799 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/substr 1800 */ 1801 String.prototype.substr = function(start, opt_length) {}; 1802 1803 /** 1804 * @this {String|string} 1805 * @param {number} start 1806 * @param {number=} opt_end 1807 * @return {string} The specified substring. 1808 * @nosideeffects 1809 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/substring 1810 */ 1811 String.prototype.substring = function(start, opt_end) {}; 1812 1813 /** 1814 * @this {String|string} 1815 * @return {string} 1816 * @nosideeffects 1817 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/sup 1818 */ 1819 String.prototype.sup = function() {}; 1820 1821 /** 1822 * @this {String|string} 1823 * @return {string} 1824 * @nosideeffects 1825 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/toLocaleUpperCase 1826 */ 1827 String.prototype.toLocaleUpperCase = function() {}; 1828 1829 /** 1830 * @this {String|string} 1831 * @return {string} 1832 * @nosideeffects 1833 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/toLocaleLowerCase 1834 */ 1835 String.prototype.toLocaleLowerCase = function() {}; 1836 1837 /** 1838 * @this {String|string} 1839 * @return {string} 1840 * @nosideeffects 1841 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/toLowerCase 1842 */ 1843 String.prototype.toLowerCase = function() {}; 1844 1845 /** 1846 * @this {String|string} 1847 * @return {string} 1848 * @nosideeffects 1849 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/toUpperCase 1850 */ 1851 String.prototype.toUpperCase = function() {}; 1852 1853 /** 1854 * @return {string} 1855 * @nosideeffects 1856 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/toSource 1857 * @override 1858 */ 1859 String.prototype.toSource = function() {}; 1860 1861 /** 1862 * @this {string|String} 1863 * @return {string} 1864 * @nosideeffects 1865 * @override 1866 */ 1867 String.prototype.toString = function() {}; 1868 1869 /** 1870 * @return {string} 1871 * @nosideeffects 1872 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/valueOf 1873 */ 1874 String.prototype.valueOf; 1875 1876 /** 1877 * @type {number} 1878 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/length 1879 */ 1880 String.prototype.length; 1881 1882 /** 1883 * @constructor 1884 * @param {*=} opt_pattern 1885 * @param {*=} opt_flags 1886 * @return {!RegExp} 1887 * @nosideeffects 1888 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp 1889 */ 1890 function RegExp(opt_pattern, opt_flags) {} 1891 1892 /** 1893 * @param {*} pattern 1894 * @param {*=} opt_flags 1895 * @return {void} 1896 * @modifies {this} 1897 * @deprecated 1898 * @see http://msdn.microsoft.com/en-us/library/x9cswe0z(v=VS.85).aspx 1899 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/compile 1900 */ 1901 RegExp.prototype.compile = function(pattern, opt_flags) {}; 1902 1903 /** 1904 * @param {*} str The string to search. 1905 * @return {Array.<string>} This should really return an Array with a few 1906 * special properties, but we do not have a good way to model this in 1907 * our type system. Also see String.prototype.match. 1908 * @see http://msdn.microsoft.com/en-us/library/z908hy33(VS.85).aspx 1909 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/exec 1910 */ 1911 RegExp.prototype.exec = function(str) {}; 1912 1913 /** 1914 * @param {*} str The string to search. 1915 * @return {boolean} Whether the string was matched. 1916 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/test 1917 */ 1918 RegExp.prototype.test = function(str) {}; 1919 1920 /** 1921 * @this {RegExp} 1922 * @return {string} 1923 * @nosideeffects 1924 * @override 1925 */ 1926 RegExp.prototype.toString = function() {}; 1927 1928 // Constructor properties: 1929 1930 /** 1931 * The string against which the last regexp was matched. 1932 * @type {string} 1933 * @see http://www.devguru.com/Technologies/Ecmascript/Quickref/regexp_input.html 1934 */ 1935 RegExp.input; 1936 1937 /** 1938 * The last matched characters. 1939 * @type {string} 1940 * @see http://www.devguru.com/Technologies/Ecmascript/Quickref/regexp_lastMatch.html 1941 */ 1942 RegExp.lastMatch; 1943 1944 /** 1945 * The last matched parenthesized substring, if any. 1946 * @type {string} 1947 * @see http://www.devguru.com/Technologies/Ecmascript/Quickref/regexp_lastParen.html 1948 */ 1949 RegExp.lastParen; 1950 1951 /** 1952 * The substring of the input up to the characters most recently matched. 1953 * @type {string} 1954 * @see http://www.devguru.com/Technologies/Ecmascript/Quickref/regexp_leftContext.html 1955 */ 1956 RegExp.leftContext; 1957 1958 /** 1959 * The substring of the input after the characters most recently matched. 1960 * @type {string} 1961 * @see http://www.devguru.com/Technologies/Ecmascript/Quickref/regexp_rightContext.html 1962 */ 1963 RegExp.rightContext; 1964 1965 /** 1966 * @type {string} 1967 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp 1968 */ 1969 RegExp.$1; 1970 /** 1971 * @type {string} 1972 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp 1973 */ 1974 RegExp.$2; 1975 /** 1976 * @type {string} 1977 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp 1978 */ 1979 RegExp.$3; 1980 /** 1981 * @type {string} 1982 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp 1983 */ 1984 RegExp.$4; 1985 /** 1986 * @type {string} 1987 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp 1988 */ 1989 RegExp.$5; 1990 /** 1991 * @type {string} 1992 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp 1993 */ 1994 RegExp.$6; 1995 /** 1996 * @type {string} 1997 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp 1998 */ 1999 RegExp.$7; 2000 /** 2001 * @type {string} 2002 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp 2003 */ 2004 RegExp.$8; 2005 /** 2006 * @type {string} 2007 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp 2008 */ 2009 RegExp.$9; 2010 2011 // Prototype properties: 2012 2013 /** 2014 * Whether to test the regular expression against all possible matches 2015 * in a string, or only against the first. 2016 * @type {boolean} 2017 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/global 2018 */ 2019 RegExp.prototype.global; 2020 2021 /** 2022 * Whether to ignore case while attempting a match in a string. 2023 * @type {boolean} 2024 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/ignoreCase 2025 */ 2026 RegExp.prototype.ignoreCase; 2027 2028 /** 2029 * The index at which to start the next match. 2030 * @type {number} 2031 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/lastIndex 2032 */ 2033 RegExp.prototype.lastIndex; 2034 2035 /** 2036 * Whether or not to search in strings across multiple lines. 2037 * @type {boolean} 2038 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/multiline 2039 */ 2040 RegExp.prototype.multiline; 2041 2042 /** 2043 * The text of the pattern. 2044 * @type {string} 2045 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/source 2046 */ 2047 RegExp.prototype.source; 2048 2049 2050 /** 2051 * @constructor 2052 * @param {*=} opt_message 2053 * @param {*=} opt_file 2054 * @param {*=} opt_line 2055 * @return {!Error} 2056 * @nosideeffects 2057 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error 2058 */ 2059 function Error(opt_message, opt_file, opt_line) {} 2060 2061 2062 /** 2063 * Chrome/v8 specific, altering the maximum depth of the stack trace 2064 * (10 by default). 2065 * @type {number} 2066 * @see http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi 2067 */ 2068 Error.stackTraceLimit; 2069 2070 2071 /** 2072 * Chrome/v8 specific, adds a stack trace to the error object. The optional 2073 * constructorOpt parameter allows you to pass in a function value. When 2074 * collecting the stack trace all frames above the topmost call to this 2075 * function, including that call, will be left out of the stack trace. 2076 * @param {Object} error The object to add the stack trace to. 2077 * @param {Function=} opt_constructor A function in the stack trace 2078 * @see http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi 2079 */ 2080 Error.captureStackTrace = function(error, opt_constructor){}; 2081 2082 2083 /** 2084 * IE-only. 2085 * @type {string} 2086 * @see http://msdn.microsoft.com/en-us/library/2w6a45b5.aspx 2087 */ 2088 Error.prototype.description; 2089 2090 2091 /** 2092 * Mozilla-only. 2093 * @type {number} 2094 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error/lineNumber 2095 */ 2096 Error.prototype.lineNumber; 2097 2098 /** 2099 * Mozilla-only 2100 * @type {string} 2101 * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error/fileName 2102 */ 2103 Error.prototype.fileName; 2104 2105 /** 2106 * @type {string} 2107 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error/name 2108 */ 2109 Error.prototype.name; 2110 2111 /** 2112 * @type {string} 2113 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error/message 2114 */ 2115 Error.prototype.message; 2116 2117 /** 2118 * Doesn't seem to exist, but closure/debug.js references it. 2119 */ 2120 Error.prototype.sourceURL; 2121 2122 /** @type {string} */ 2123 Error.prototype.stack; 2124 2125 2126 /** 2127 * @constructor 2128 * @extends {Error} 2129 * @param {*=} opt_message 2130 * @param {*=} opt_file 2131 * @param {*=} opt_line 2132 * @return {!EvalError} 2133 * @nosideeffects 2134 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/EvalError 2135 */ 2136 function EvalError(opt_message, opt_file, opt_line) {} 2137 2138 /** 2139 * @constructor 2140 * @extends {Error} 2141 * @param {*=} opt_message 2142 * @param {*=} opt_file 2143 * @param {*=} opt_line 2144 * @return {!RangeError} 2145 * @nosideeffects 2146 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RangeError 2147 */ 2148 function RangeError(opt_message, opt_file, opt_line) {} 2149 2150 /** 2151 * @constructor 2152 * @extends {Error} 2153 * @param {*=} opt_message 2154 * @param {*=} opt_file 2155 * @param {*=} opt_line 2156 * @return {!ReferenceError} 2157 * @nosideeffects 2158 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/ReferenceError 2159 */ 2160 function ReferenceError(opt_message, opt_file, opt_line) {} 2161 2162 /** 2163 * @constructor 2164 * @extends {Error} 2165 * @param {*=} opt_message 2166 * @param {*=} opt_file 2167 * @param {*=} opt_line 2168 * @return {!SyntaxError} 2169 * @nosideeffects 2170 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/SyntaxError 2171 */ 2172 function SyntaxError(opt_message, opt_file, opt_line) {} 2173 2174 /** 2175 * @constructor 2176 * @extends {Error} 2177 * @param {*=} opt_message 2178 * @param {*=} opt_file 2179 * @param {*=} opt_line 2180 * @return {!TypeError} 2181 * @nosideeffects 2182 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/TypeError 2183 */ 2184 function TypeError(opt_message, opt_file, opt_line) {} 2185 2186 /** 2187 * @constructor 2188 * @extends {Error} 2189 * @param {*=} opt_message 2190 * @param {*=} opt_file 2191 * @param {*=} opt_line 2192 * @return {!URIError} 2193 * @nosideeffects 2194 * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/URIError 2195 */ 2196 function URIError(opt_message, opt_file, opt_line) {} 2197 2198 2199 // JScript extensions. 2200 // @see http://msdn.microsoft.com/en-us/library/894hfyb4(VS.80).aspx 2201 2202 /** 2203 * @param {string} progId 2204 * @param {string=} opt_location 2205 * @constructor 2206 * @see http://msdn.microsoft.com/en-us/library/7sw4ddf8.aspx 2207 */ 2208 function ActiveXObject(progId, opt_location) {} 2209 2210 /** 2211 * @return {string} 2212 * @nosideeffects 2213 * @see http://msdn.microsoft.com/en-us/library/9k34bww2(VS.80).aspx 2214 */ 2215 function ScriptEngine() {} 2216 2217 /** 2218 * @return {number} 2219 * @nosideeffects 2220 * @see http://msdn.microsoft.com/en-us/library/yf25ky07(VS.80).aspx 2221 */ 2222 function ScriptEngineMajorVersion() {} 2223 2224 /** 2225 * @return {number} 2226 * @nosideeffects 2227 * @see http://msdn.microsoft.com/en-us/library/wx3812cz(VS.80).aspx 2228 */ 2229 function ScriptEngineMinorVersion() {} 2230 2231 /** 2232 * @return {number} 2233 * @nosideeffects 2234 * @see http://msdn.microsoft.com/en-us/library/e98hsk2f(VS.80).aspx 2235 */ 2236 function ScriptEngineBuildVersion() {}