tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

window.js (4733B)


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