| 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 | /** |
| 18 | * @fileoverview JavaScript Built-Ins for windows properties. |
| 19 | * |
| 20 | * @externs |
| 21 | */ |
| 22 | |
| 23 | // Window properties |
| 24 | // Only common properties are here. Others such as open() |
| 25 | // should be used with an explicit Window object. |
| 26 | |
| 27 | /** |
| 28 | * @type {!Window} |
| 29 | * @see https://developer.mozilla.org/en/DOM/window.top |
| 30 | * @const |
| 31 | */ |
| 32 | var top; |
| 33 | |
| 34 | /** |
| 35 | * @type {Navigator} |
| 36 | * @see https://developer.mozilla.org/en/DOM/window.navigator |
| 37 | * @const |
| 38 | */ |
| 39 | var navigator; |
| 40 | |
| 41 | /** |
| 42 | * @type {!HTMLDocument} |
| 43 | * @see https://developer.mozilla.org/en/DOM/window.document |
| 44 | * @const |
| 45 | */ |
| 46 | var document; |
| 47 | |
| 48 | /** |
| 49 | * @type {Location} |
| 50 | * @see https://developer.mozilla.org/en/DOM/window.location |
| 51 | * @const |
| 52 | * @suppress {duplicate} |
| 53 | */ |
| 54 | var location; |
| 55 | |
| 56 | /** |
| 57 | * @see https://developer.mozilla.org/En/DOM/Window.screen |
| 58 | * @const |
| 59 | */ |
| 60 | var screen; |
| 61 | |
| 62 | /** |
| 63 | * @type {!Window} |
| 64 | * @see https://developer.mozilla.org/En/DOM/Window.self |
| 65 | * @const |
| 66 | */ |
| 67 | var self; |
| 68 | |
| 69 | // Magic functions for Firefox's LiveConnect. |
| 70 | // We'll probably never use these in practice. But redefining them |
| 71 | // will fire up the JVM, so we want to reserve the symbol names. |
| 72 | |
| 73 | /** |
| 74 | * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/JavaArray |
| 75 | */ |
| 76 | var JavaArray; |
| 77 | |
| 78 | /** |
| 79 | * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/JavaClass |
| 80 | */ |
| 81 | var JavaClass; |
| 82 | |
| 83 | // We just ripped this from the FF source; it doesn't appear to be |
| 84 | // publicly documented. |
| 85 | var JavaMember; |
| 86 | |
| 87 | /** |
| 88 | * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/JavaObject |
| 89 | */ |
| 90 | var JavaObject; |
| 91 | |
| 92 | /** |
| 93 | * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/JavaPackage |
| 94 | */ |
| 95 | var JavaPackage; |
| 96 | |
| 97 | /** |
| 98 | * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Packages |
| 99 | */ |
| 100 | var Packages; |
| 101 | |
| 102 | /** |
| 103 | * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/java |
| 104 | */ |
| 105 | var java; |
| 106 | |
| 107 | /** |
| 108 | * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/netscape |
| 109 | */ |
| 110 | var netscape; |
| 111 | |
| 112 | /** |
| 113 | * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/sun |
| 114 | */ |
| 115 | var sun; |
| 116 | |
| 117 | /** |
| 118 | * @see https://developer.mozilla.org/en/DOM/window.alert |
| 119 | */ |
| 120 | function alert(x) {} |
| 121 | |
| 122 | /** |
| 123 | * @param {number|undefined|null} immediateID |
| 124 | * @see https://developer.mozilla.org/en-US/docs/DOM/window.clearImmediate |
| 125 | * @see http://msdn.microsoft.com/en-us/library/ie/hh924825(v=vs.85).aspx |
| 126 | */ |
| 127 | function clearImmediate(immediateID) {} |
| 128 | |
| 129 | /** |
| 130 | * @param {number|undefined?} intervalID |
| 131 | * @see https://developer.mozilla.org/en/DOM/window.clearInterval |
| 132 | */ |
| 133 | function clearInterval(intervalID) {} |
| 134 | |
| 135 | /** |
| 136 | * @param {number|undefined?} timeoutID |
| 137 | * @see https://developer.mozilla.org/en/DOM/window.clearTimeout |
| 138 | */ |
| 139 | function clearTimeout(timeoutID) {} |
| 140 | |
| 141 | /** |
| 142 | * @see https://developer.mozilla.org/en/DOM/window.confirm |
| 143 | */ |
| 144 | function confirm(x) {} |
| 145 | |
| 146 | /** |
| 147 | * @see https://developer.mozilla.org/en/DOM/window.dump |
| 148 | */ |
| 149 | function dump(x) {} |
| 150 | |
| 151 | /** |
| 152 | * @param {string} message |
| 153 | * @param {string=} opt_value |
| 154 | * @return {?string} |
| 155 | * @see https://developer.mozilla.org/en/DOM/window.prompt |
| 156 | */ |
| 157 | function prompt(message, opt_value) {} |
| 158 | |
| 159 | /** |
| 160 | * @param {function()} callback |
| 161 | * @return {number} |
| 162 | * @see https://developer.mozilla.org/en-US/docs/DOM/window.setImmediate |
| 163 | * @see http://msdn.microsoft.com/en-us/library/ie/hh773176(v=vs.85).aspx |
| 164 | */ |
| 165 | function setImmediate(callback) {} |
| 166 | |
| 167 | /** |
| 168 | * @param {Function|string} callback |
| 169 | * @param {number} delay |
| 170 | * @return {number} |
| 171 | * @see https://developer.mozilla.org/en/DOM/window.setInterval |
| 172 | * @see https://msdn.microsoft.com/en-us/library/ms536749(v=VS.85).aspx |
| 173 | */ |
| 174 | function setInterval(callback, delay) {} |
| 175 | |
| 176 | /** |
| 177 | * @param {Function|string} callback |
| 178 | * @param {number} delay |
| 179 | * @return {number} |
| 180 | * @see https://developer.mozilla.org/en/DOM/window.setTimeout |
| 181 | * @see https://msdn.microsoft.com/en-us/library/ms536753(VS.85).aspx |
| 182 | */ |
| 183 | function setTimeout(callback, delay) {} |