Source code
Revision control
Copy as Markdown
Other Tools
/*
* Copyright 2008 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview JavaScript Built-Ins for windows properties.
*
* @externs
* @author stevey@google.com (Steve Yegge)
*/
// Window properties
// Only common properties are here. Others such as open()
// should be used with an explicit Window object.
/**
* @type {!Window}
* @const
*/
var top;
/**
* @type {Navigator}
* @const
*/
var navigator;
/**
* @type {!HTMLDocument}
* @const
*/
var document;
/**
* @type {Location}
* @const
* @suppress {duplicate}
* @implicitCast
*/
var location;
/**
* @type {!Screen}
* @const
*/
var screen;
/**
* @type {!Window}
* @const
*/
var self;
// Magic functions for Firefox's LiveConnect.
// We'll probably never use these in practice. But redefining them
// will fire up the JVM, so we want to reserve the symbol names.
/**
*/
var JavaArray;
/**
*/
var JavaClass;
// We just ripped this from the FF source; it doesn't appear to be
// publicly documented.
var JavaMember;
/**
*/
var JavaObject;
/**
*/
var JavaPackage;
/**
*/
var Packages;
/**
*/
var java;
/**
*/
var netscape;
/**
*/
var sun;
/**
*/
function alert(x) {}
/**
* @param {number|undefined|null} immediateID
*/
function clearImmediate(immediateID) {}
/**
* @param {number|undefined?} intervalID
* @suppress {duplicate}
*/
function clearInterval(intervalID) {}
/**
* @param {number|undefined?} timeoutID
* @suppress {duplicate}
*/
function clearTimeout(timeoutID) {}
/**
* @param {*} message
* @return {boolean}
*/
function confirm(message) {}
/**
*/
function dump(x) {}
/**
* @param {string} message
* @param {string=} opt_value
* @return {?string}
*/
function prompt(message, opt_value) {}
/**
* @param {function()} callback
* @return {number}
*/
function setImmediate(callback) {}
/**
* @param {Function|string} callback
* @param {number=} opt_delay
* @return {number}
*/
function setInterval(callback, opt_delay) {}
/**
* @param {Function|string} callback
* @param {number=} opt_delay
* @param {...*} var_args
* @return {number}
*/
function setTimeout(callback, opt_delay, var_args) {}