You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

242 lines
61 KiB

<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>goog</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Namespace goog</h1><a class="source" href="source/lib/goog/base.js.src.html#l41">code &raquo;</a></header><section><p>Base namespace for the Closure library. Checks to see goog is already
defined in the current scope before assigning to prevent clobbering if
base.js is loaded more than once.</section><section><h2>Classes</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="class_goog_Uri.html">goog.Uri</a><dd>This class contains setters and getters for the parts of the URI.</dl></table></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="static-functions"><h2>Global Functions</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l544">code &raquo;</a><span class="member"><a name="goog.abstractMethod">goog.abstractMethod</a> <span class="args">( )</span></span></div><p>When defining a class Foo with an abstract method bar(), you can do:
Foo.prototype.bar = goog.abstractMethod
Now if a subclass of Foo fails to override bar(), an error will be thrown
when bar() is invoked.
Note: This does not take the name of the function to override as an argument
because that would make it more difficult to obfuscate our JavaScript code.</summary><div class="info"><table><tbody><tr><th>Throws<tr><td><dl><dt><code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error">Error</a></code><dd>when invoked to indicate the method should be overridden.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l379">code &raquo;</a><span class="member"><a name="goog.addDependency">goog.addDependency</a> <span class="args">( relPath, provides, requires )</span></span></div><p>Adds a dependency from a file to the files it requires.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>relPath: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The path to the js file.<dt>provides: <code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code><dd>An array of strings with the names of the objects
this file provides.<dt>requires: <code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code><dd>An array of strings with the names of the objects
this file requires.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l555">code &raquo;</a><span class="member"><a name="goog.addSingletonGetter">goog.addSingletonGetter</a> <span class="args">( ctor )</span></span></div><p>Adds a <code >getInstance</code> static method that always returns the same
instance object.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>ctor: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The constructor for the class to add the static
method to.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1638">code &raquo;</a><span class="member"><a name="goog.base">goog.base</a> <span class="args">( me, opt_methodName, var_args )</span> &rArr; <code class="type">*</code></span></div><p>Call up to the superclass.
If this is called from a constructor, then this calls the superclass
constructor with arguments 1-N.
If this is called from a prototype method, then you must pass the name of the
method as the second argument to this function. If you do not, you will get a
runtime error. This calls the superclass' method with arguments 2-N.
This function only works if you use goog.inherits to express inheritance
relationships between your classes.
This function is a compiler primitive. At compile-time, the compiler will do
macro expansion to remove a lot of the extra overhead that this function
introduces. The compiler will also enforce a lot of the assumptions that this
function makes, and treat it as a compiler error if you break them.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>me: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>Should always be "this".<dt>opt_methodName: <code class="type">*=</code><dd>The method name if calling a super method.<dt>var_args: <code class="type">...*</code><dd>The rest of the arguments.</dl><tr><th>Returns<tr><td><dl>The return value of the superclass method.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1205">code &raquo;</a><code class="type">&lt;T&gt;</code> <span class="member"><a name="goog.bind">goog.bind</a> <span class="args">( fn, selfObj, var_args )</span> &rArr; <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code></span></div><p>Partially applies this function to a particular 'this object' and zero or
more arguments. The result is a new function with some arguments of the first
function pre-filled and the value of this 'pre-specified'.
Remaining arguments specified at call-time are appended to the pre-specified
ones.
Also see: <code class="type"><a class="unresolved-link">#partial</a></code>.
Usage:
<pre>var barMethBound = bind(myFunction, myObj, 'arg1', 'arg2');
barMethBound('arg3', 'arg4');</pre></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>fn: <code class="type">?function(this: T, ...)</code><dd>A function to partially apply.<dt>selfObj: <code class="type">T</code><dd>Specifies the object which this should point to when the
function is run.<dt>var_args: <code class="type">...*</code><dd>Additional arguments that are partially applied to the
function.</dl><tr><th>Returns<tr><td><dl>A partially-applied form of the function bind() was
invoked as a method of.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1159">code &raquo;</a><span class="member"><a name="goog.bindJs_">goog.bindJs_</a> <span class="args">( fn, selfObj, var_args )</span> &rArr; <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code></span></div><p>A pure-JS implementation of goog.bind.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>fn: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>A function to partially apply.<dt>selfObj: <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>)</code><dd>Specifies the object which this should
point to when the function is run.<dt>var_args: <code class="type">...*</code><dd>Additional arguments that are partially applied to the
function.</dl><tr><th>Returns<tr><td><dl>A partially-applied form of the function bind() was
invoked as a method of.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1143">code &raquo;</a><span class="member"><a name="goog.bindNative_">goog.bindNative_</a> <span class="args">( fn, selfObj, var_args )</span> &rArr; <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code></span></div><p>A native implementation of goog.bind.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>fn: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>A function to partially apply.<dt>selfObj: <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>)</code><dd>Specifies the object which this should
point to when the function is run.<dt>var_args: <code class="type">...*</code><dd>Additional arguments that are partially applied to the
function.</dl><tr><th>Returns<tr><td><dl>A partially-applied form of the function bind() was
invoked as a method of.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1112">code &raquo;</a><span class="member deprecation-notice"><a name="goog.cloneObject">goog.cloneObject</a> <span class="args">( obj )</span> &rArr; <code class="type">*</code></span></div><div class="deprecation-notice">Deprecated: <span class="deprecation-reason">goog.cloneObject is unsafe. Prefer the goog.object methods.</span></div><p>Clones a value. The input may be an Object, Array, or basic type. Objects and
arrays will be cloned recursively.
WARNINGS:
<code>goog.cloneObject</code> does not detect reference loops. Objects that
refer to themselves will cause infinite recursion.
<code>goog.cloneObject</code> is unaware of unique identifiers, and copies
UIDs created by <code>getUid</code> into cloned results.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>obj: <code class="type">*</code><dd>The value to clone.</dl><tr><th>Returns<tr><td><dl>A clone of the input value.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l156">code &raquo;</a><span class="member"><a name="goog.define">goog.define</a> <span class="args">( name, defaultValue )</span></span></div><p>Defines a named value. In uncompiled mode, the value is retreived from
CLOSURE_DEFINES or CLOSURE_UNCOMPILED_DEFINES if the object is defined and
has the property specified, and otherwise used the defined defaultValue.
When compiled, the default can be overridden using compiler command-line
options.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The distinguished name to provide.<dt>defaultValue</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l116">code &raquo;</a><span class="member"><a name="goog.exportPath_">goog.exportPath_</a> <span class="args">( name, opt_object, opt_objectToExportTo )</span></span></div><p>Builds an object structure for the provided namespace path, ensuring that
names that already exist are not overwritten. For example:
"a.b.c" -> a = {};a.b={};a.b.c={};
Used by goog.provide and goog.exportSymbol.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>name of the object that this file defines.<dt>opt_object: <code class="type">*=</code><dd>the object to expose at the end of the path.<dt>opt_objectToExportTo: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>The object to add the path to; default
is |goog.global|.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1545">code &raquo;</a><span class="member"><a name="goog.exportProperty">goog.exportProperty</a> <span class="args">( object, publicName, symbol )</span></span></div><p>Exports a property unobfuscated into the object's namespace.
ex. goog.exportProperty(Foo, 'staticFunction', Foo.staticFunction);
ex. goog.exportProperty(Foo.prototype, 'myMethod', Foo.prototype.myMethod);</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>object: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>Object whose static property is being exported.<dt>publicName: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Unobfuscated name to export.<dt>symbol: <code class="type">*</code><dd>Object the name should point to.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1532">code &raquo;</a><span class="member"><a name="goog.exportSymbol">goog.exportSymbol</a> <span class="args">( publicPath, object, opt_objectToExportTo )</span></span></div><p>Exposes an unobfuscated global namespace path for the given object.
Note that fields of the exported object *will* be obfuscated, unless they are
exported in turn via this function or goog.exportProperty.
Also handy for making public items that are defined in anonymous closures.
ex. goog.exportSymbol('public.path.Foo', Foo);
ex. goog.exportSymbol('public.path.Foo.staticFunction', Foo.staticFunction);
public.path.Foo.staticFunction();
ex. goog.exportSymbol('public.path.Foo.prototype.myMethod',
Foo.prototype.myMethod);
new public.path.Foo().myMethod();</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>publicPath: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Unobfuscated name to export.<dt>object: <code class="type">*</code><dd>Object the name should point to.<dt>opt_objectToExportTo: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>The object to add the path to; default
is goog.global.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l628">code &raquo;</a><span class="member"><a name="goog.findBasePath_">goog.findBasePath_</a> <span class="args">( )</span></span></div><p>Tries to detect the base path of base.js script that bootstraps Closure.</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l301">code &raquo;</a><span class="member"><a name="goog.forwardDeclare">goog.forwardDeclare</a> <span class="args">( name )</span></span></div><p>Forward declares a symbol. This is an indication to the compiler that the
symbol may be used in the source yet is not required and may not be provided
in compilation.
The most common usage of forward declaration is code that takes a type as a
function parameter but does not need to require it. By forward declaring
instead of requiring, no hard dependency is made, and (if not required
elsewhere) the namespace may never be required and thus, not be pulled
into the JavaScript binary. If it is required elsewhere, it will be type
checked as normal.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The namespace to forward declare in the form of
"goog.package.part".</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1381">code &raquo;</a><span class="member"><a name="goog.getCssName">goog.getCssName</a> <span class="args">( className, opt_modifier )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Handles strings that are intended to be used as CSS class names.
This function works in tandem with @see goog.setCssNameMapping.
Without any mapping set, the arguments are simple joined with a hyphen and
passed through unaltered.
When there is a mapping, there are two possible styles in which these
mappings are used. In the BY_PART style, each part (i.e. in between hyphens)
of the passed in css name is rewritten according to the map. In the BY_WHOLE
style, the full css name is looked up in the map directly. If a rewrite is
not specified by the map, the compiler will output a warning.
When the mapping is passed to the compiler, it will replace calls to
goog.getCssName with the strings from the mapping, e.g.
var x = goog.getCssName('foo');
var y = goog.getCssName(this.baseClass, 'active');
becomes:
var x= 'foo';
var y = this.baseClass + '-active';
If one argument is passed it will be processed, if two are passed only the
modifier will be processed, as it is assumed the first argument was generated
as a result of calling goog.getCssName.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>className: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The class name.<dt>opt_modifier: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A modifier to be appended to the class name.</dl><tr><th>Returns<tr><td><dl>The class name or the concatenation of the class name and
the modifier.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1086">code &raquo;</a><span class="member deprecation-notice"><a name="goog.getHashCode">goog.getHashCode</a> <span class="args">( obj )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><div class="deprecation-notice">Deprecated: <span class="deprecation-reason">Use goog.getUid instead.</span></div><p>Adds a hash code field to an object. The hash code is unique for the
given object.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>obj: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>The object to get the hash code for.</dl><tr><th>Returns<tr><td><dl>The hash code for the object.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1481">code &raquo;</a><span class="member"><a name="goog.getMsg">goog.getMsg</a> <span class="args">( str, opt_values )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Gets a localized message.
This function is a compiler primitive. If you give the compiler a localized
message bundle, it will replace the string at compile-time with a localized
version, and expand goog.getMsg call to a concatenated string.
Messages must be initialized in the form:
<code>
var MSG_NAME = goog.getMsg('Hello {$placeholder}', {'placeholder': 'world'});
</code></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>str: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Translatable string, places holders in the form {$foo}.<dt>opt_values: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Map of place holder name to value.</dl><tr><th>Returns<tr><td><dl>message with placeholders filled.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1506">code &raquo;</a><span class="member"><a name="goog.getMsgWithFallback">goog.getMsgWithFallback</a> <span class="args">( a, b )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Gets a localized message. If the message does not have a translation, gives a
fallback message.
This is useful when introducing a new message that has not yet been
translated into all languages.
This function is a compiler primitive. Must be used in the form:
<code>var x = goog.getMsgWithFallback(MSG_A, MSG_B);</code>
where MSG_A and MSG_B were initialized with goog.getMsg.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>a: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The preferred message.<dt>b: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The fallback message.</dl><tr><th>Returns<tr><td><dl>The best translated message.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l341">code &raquo;</a><span class="member"><a name="goog.getObjectByName">goog.getObjectByName</a> <span class="args">( name, opt_obj )</span></span></div><p>Returns an object based on its fully qualified external name. The object
is not found if null or undefined. If you are using a compilation pass that
renames property names beware that using this function will not find renamed
properties.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The fully qualified name.<dt>opt_obj: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>The object within which to look; default is
|goog.global|.</dl><tr><th>Returns<tr><td><dl>The value (object or primitive) or, if not found, null.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l774">code &raquo;</a><span class="member"><a name="goog.getPathFromDeps_">goog.getPathFromDeps_</a> <span class="args">( rule )</span> &rArr; <code class="type">?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Looks at the dependency rules and tries to determine the script file that
fulfills a particular rule.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>rule: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>In the form goog.namespace.Class or project.script.</dl><tr><th>Returns<tr><td><dl>Url corresponding to the rule, or null.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1016">code &raquo;</a><span class="member"><a name="goog.getUid">goog.getUid</a> <span class="args">( obj )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Gets a unique ID for an object. This mutates the object so that further calls
with the same object as a parameter returns the same value. The unique ID is
guaranteed to be unique across the current session amongst objects that are
passed into <code >getUid</code>. There is no guarantee that the ID is unique or
consistent across sessions. It is unsafe to generate unique ID for function
prototypes.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>obj: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>The object to get the unique ID for.</dl><tr><th>Returns<tr><td><dl>The unique ID for the object.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1286">code &raquo;</a><span class="member"><a name="goog.globalEval">goog.globalEval</a> <span class="args">( script )</span></span></div><p>Evals JavaScript in the global scope. In IE this uses execScript, other
browsers use goog.global.eval. If goog.global.eval does not evaluate in the
global scope (for example, in Safari), appends a script tag instead.
Throws an exception if neither execScript or eval is defined.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>script: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>JavaScript string.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l363">code &raquo;</a><span class="member deprecation-notice"><a name="goog.globalize">goog.globalize</a> <span class="args">( obj, opt_global )</span></span></div><div class="deprecation-notice">Deprecated: <span class="deprecation-reason">Properties may be explicitly exported to the global scope, but
this should no longer be done in bulk.</span></div><p>Globalizes a whole namespace, such as goog or goog.lang.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>obj: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>The namespace to globalize.<dt>opt_global: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>The object to add the properties to.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1035">code &raquo;</a><span class="member"><a name="goog.hasUid">goog.hasUid</a> <span class="args">( obj )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Whether the given object is alreay assigned a unique ID.
This does not modify the object.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>obj: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>The object to check.</dl><tr><th>Returns<tr><td><dl>Whether there an assigned unique id for the object.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l526">code &raquo;</a><span class="member deprecation-notice"><a name="goog.identityFunction">goog.identityFunction</a> <span class="args">( opt_returnValue, var_args )</span></span></div><div class="deprecation-notice">Deprecated: <span class="deprecation-reason">Use goog.functions.identity instead.</span></div><p>The identity function. Returns its first argument.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_returnValue: <code class="type">*=</code><dd>The single value that will be returned.<dt>var_args: <code class="type">...*</code><dd>Optional trailing arguments. These are ignored.</dl><tr><th>Returns<tr><td><dl>The first argument. We can't know the type -- just pass it along
without type.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l657">code &raquo;</a><span class="member"><a name="goog.importScript_">goog.importScript_</a> <span class="args">( src )</span></span></div><p>Imports a script if, and only if, that script hasn't already been imported.
(Must be called at execution time)</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>src: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Script source.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l617">code &raquo;</a><span class="member"><a name="goog.inHtmlDocument_">goog.inHtmlDocument_</a> <span class="args">( )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Tries to detect whether is in the context of an HTML document.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>True if it looks like HTML document.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1580">code &raquo;</a><span class="member"><a name="goog.inherits">goog.inherits</a> <span class="args">( childCtor, parentCtor )</span></span></div><p>Inherit the prototype methods from one constructor into another.
Usage:
<pre>
function ParentClass(a, b) { }
ParentClass.prototype.foo = function(a) { }
function ChildClass(a, b, c) {
goog.base(this, a, b);
}
goog.inherits(ChildClass, ParentClass);
var child = new ChildClass('a', 'b', 'see');
child.foo(); // This works.
</pre>
In addition, a superclass' implementation of a method can be invoked as
follows:
<pre>
ChildClass.prototype.foo = function(a) {
ChildClass.superClass_.foo.call(this, a);
// Other code here.
};
</pre></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>childCtor: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>Child class.<dt>parentCtor: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>Parent class.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l922">code &raquo;</a><span class="member"><a name="goog.isArray">goog.isArray</a> <span class="args">( val )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Returns true if the specified value is an array.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>val: <code class="type">?</code><dd>Variable to test.</dl><tr><th>Returns<tr><td><dl>Whether variable is an array.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l934">code &raquo;</a><span class="member"><a name="goog.isArrayLike">goog.isArrayLike</a> <span class="args">( val )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Returns true if the object looks like an array. To qualify as array like
the value needs to be either a NodeList or an object with a Number length
property.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>val: <code class="type">?</code><dd>Variable to test.</dl><tr><th>Returns<tr><td><dl>Whether variable is an array.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l966">code &raquo;</a><span class="member"><a name="goog.isBoolean">goog.isBoolean</a> <span class="args">( val )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Returns true if the specified value is a boolean.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>val: <code class="type">?</code><dd>Variable to test.</dl><tr><th>Returns<tr><td><dl>Whether variable is boolean.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l946">code &raquo;</a><span class="member"><a name="goog.isDateLike">goog.isDateLike</a> <span class="args">( val )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Returns true if the object looks like a Date. To qualify as Date-like the
value needs to be an object and have a getFullYear() function.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>val: <code class="type">?</code><dd>Variable to test.</dl><tr><th>Returns<tr><td><dl>Whether variable is a like a Date.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l98">code &raquo;</a><span class="member"><a name="goog.isDef">goog.isDef</a> <span class="args">( val )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Returns true if the specified value is not undefined.
WARNING: Do not use this to test if an object has a property. Use the in
operator instead.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>val: <code class="type">?</code><dd>Variable to test.</dl><tr><th>Returns<tr><td><dl>Whether variable is defined.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l911">code &raquo;</a><span class="member"><a name="goog.isDefAndNotNull">goog.isDefAndNotNull</a> <span class="args">( val )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Returns true if the specified value is defined and not null.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>val: <code class="type">?</code><dd>Variable to test.</dl><tr><th>Returns<tr><td><dl>Whether variable is defined and not null.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l986">code &raquo;</a><span class="member"><a name="goog.isFunction">goog.isFunction</a> <span class="args">( val )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Returns true if the specified value is a function.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>val: <code class="type">?</code><dd>Variable to test.</dl><tr><th>Returns<tr><td><dl>Whether variable is a function.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l901">code &raquo;</a><span class="member"><a name="goog.isNull">goog.isNull</a> <span class="args">( val )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Returns true if the specified value is null.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>val: <code class="type">?</code><dd>Variable to test.</dl><tr><th>Returns<tr><td><dl>Whether variable is null.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l976">code &raquo;</a><span class="member"><a name="goog.isNumber">goog.isNumber</a> <span class="args">( val )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Returns true if the specified value is a number.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>val: <code class="type">?</code><dd>Variable to test.</dl><tr><th>Returns<tr><td><dl>Whether variable is a number.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l997">code &raquo;</a><span class="member"><a name="goog.isObject">goog.isObject</a> <span class="args">( val )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Returns true if the specified value is an object. This includes arrays and
functions.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>val: <code class="type">?</code><dd>Variable to test.</dl><tr><th>Returns<tr><td><dl>Whether variable is an object.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l313">code &raquo;</a><span class="member"><a name="goog.isProvided_">goog.isProvided_</a> <span class="args">( name )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Check if the given name has been goog.provided. This will return false for
names that are available only as implicit namespaces.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>name of the object to look for.</dl><tr><th>Returns<tr><td><dl>Whether the name has been provided.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l956">code &raquo;</a><span class="member"><a name="goog.isString">goog.isString</a> <span class="args">( val )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Returns true if the specified value is a string.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>val: <code class="type">?</code><dd>Variable to test.</dl><tr><th>Returns<tr><td><dl>Whether variable is a string.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1255">code &raquo;</a><span class="member"><a name="goog.mixin">goog.mixin</a> <span class="args">( target, source )</span></span></div><p>Copies all the members of a source object to a target object. This method
does not work on all browsers for all objects that contain keys such as
toString or hasOwnProperty. Use goog.object.extend for this purpose.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>Target.<dt>source: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>Source.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1272">code &raquo;</a><span class="member"><a name="goog.now">goog.now</a> <span class="args">( )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>An integer value representing the number of milliseconds
between midnight, January 1, 1970 and the current time.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l514">code &raquo;</a><span class="member"><a name="goog.nullFunction">goog.nullFunction</a> <span class="args">( )</span> &rArr; <code class="type">void</code></span></div><p>Null function used for default values of callbacks, etc.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>Nothing.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1236">code &raquo;</a><span class="member"><a name="goog.partial">goog.partial</a> <span class="args">( fn, var_args )</span> &rArr; <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code></span></div><p>Like bind(), except that a 'this object' is not required. Useful when the
target function is already bound.
Usage:
var g = partial(f, arg1, arg2);
g(arg3, arg4);</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>fn: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>A function to partially apply.<dt>var_args: <code class="type">...*</code><dd>Additional arguments that are partially applied to fn.</dl><tr><th>Returns<tr><td><dl>A partially-applied form of the function bind() was
invoked as a method of.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l240">code &raquo;</a><span class="member"><a name="goog.provide">goog.provide</a> <span class="args">( name )</span></span></div><p>Creates object stubs for a namespace. The presence of one or more
goog.provide() calls indicate that the file defines the given
objects/namespaces. Provided objects must not be null or undefined.
Build tools also scan for provide/require statements
to discern dependencies, build dependency files (see deps.js), etc.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Namespace provided by this file in the form
"goog.package.part".</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1094">code &raquo;</a><span class="member deprecation-notice"><a name="goog.removeHashCode">goog.removeHashCode</a> <span class="args">( obj )</span></span></div><div class="deprecation-notice">Deprecated: <span class="deprecation-reason">Use goog.removeUid instead.</span></div><p>Removes the hash code field from an object.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>obj: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>The object to remove the field from.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1046">code &raquo;</a><span class="member"><a name="goog.removeUid">goog.removeUid</a> <span class="args">( obj )</span></span></div><p>Removes the unique ID from an object. This is useful if the object was
previously mutated using <code >goog.getUid</code> in which case the mutation is
undone.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>obj: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>The object to remove the unique ID field from.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l442">code &raquo;</a><span class="member"><a name="goog.require">goog.require</a> <span class="args">( name )</span></span></div><p>Implements a system for the dynamic resolution of dependencies that works in
parallel with the BUILD system. Note that all calls to goog.require will be
stripped by the JSCompiler when the --closure_pass option is used.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Namespace to include (as was given in goog.provide()) in
the form "goog.package.part".</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1687">code &raquo;</a><span class="member"><a name="goog.scope">goog.scope</a> <span class="args">( fn )</span></span></div><p>Allow for aliasing within scope functions. This function exists for
uncompiled code - in compiled code the calls will be inlined and the aliases
applied. In uncompiled code the function is simply run since the aliases as
written are valid JavaScript.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>fn: <code class="type">function()</code><dd>Function to call. This function can contain aliases
to namespaces (e.g. "var dom = goog.dom") or classes
(e.g. "var Timer = goog.Timer").</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1437">code &raquo;</a><span class="member"><a name="goog.setCssNameMapping">goog.setCssNameMapping</a> <span class="args">( mapping, opt_style )</span></span></div><p>Sets the map to check when returning a value from goog.getCssName(). Example:
<pre>
goog.setCssNameMapping({
"goog": "a",
"disabled": "b",
});
var x = goog.getCssName('goog');
// The following evaluates to: "a a-b".
goog.getCssName('goog') + ' ' + goog.getCssName(x, 'disabled')
</pre>
When declared as a map of string literals to string literals, the JSCompiler
will replace all calls to goog.getCssName() using the supplied map if the
--closure_pass flag is set.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>mapping: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>A map of strings to strings where keys are possible
arguments to goog.getCssName() and values are the corresponding values
that should be returned.<dt>opt_style: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>The style of css name mapping. There are two valid
options: 'BY_PART', and 'BY_WHOLE'.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l276">code &raquo;</a><span class="member"><a name="goog.setTestOnly">goog.setTestOnly</a> <span class="args">( opt_message )</span></span></div><p>Marks that the current file should only be used for testing, and never for
live code in production.
In the case of unit tests, the message may optionally be an exact namespace
for the test (e.g. 'goog.stringTest'). The linter will then ignore the extra
provide (if not explicitly defined in the code).</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>Optional message to add to the error that's
raised when used in production code.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l803">code &raquo;</a><span class="member"><a name="goog.typeOf">goog.typeOf</a> <span class="args">( value )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>This is a "fixed" version of the typeof operator. It differs from the typeof
operator in such a way that null returns 'null' and arrays return 'array'.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The value to get the type of.</dl><tr><th>Returns<tr><td><dl>The name of the type.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l674">code &raquo;</a><span class="member"><a name="goog.writeScriptTag_">goog.writeScriptTag_</a> <span class="args">( src )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>The default implementation of the import function. Writes a script tag to
import the script.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>src: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The script source.</dl><tr><th>Returns<tr><td><dl>True if the script was imported, false otherwise.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l708">code &raquo;</a><span class="member"><a name="goog.writeScripts_">goog.writeScripts_</a> <span class="args">( )</span></span></div><p>Resolves dependencies based on the dependencies added using addDependency
and calls importScript_ in the correct order.</summary></details></div></div></section><section id="static-properties"><h2>Global Properties</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l583">code &raquo;</a><span class="member"><a name="goog.DEPENDENCIES_ENABLED">goog.DEPENDENCIES_ENABLED</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>True if goog.dependencies_ is available.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1068">code &raquo;</a><span class="member"><a name="goog.UID_PROPERTY_">goog.UID_PROPERTY_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Name for unique ID property. Initialized in a way to help avoid collisions
with other closure JavaScript on the same page.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l480">code &raquo;</a><span class="member"><a name="goog.basePath">goog.basePath</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Path for included scripts.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1347">code &raquo;</a><span class="member"><a name="goog.cssNameMappingStyle_">goog.cssNameMappingStyle_</a> : <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>)</code></span></div><p>Optional obfuscation style for CSS class names. Should be set to either
'BY_WHOLE' or 'BY_PART' if defined.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1337">code &raquo;</a><span class="member"><a name="goog.cssNameMapping_">goog.cssNameMapping_</a> : <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>)</code></span></div><p>Optional map of CSS class names to obfuscated names used with
goog.getCssName().</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l602">code &raquo;</a><span class="member"><a name="goog.dependencies_">goog.dependencies_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code></span></div><p>This object is used to keep track of dependencies and other data that is
used for loading scripts.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1327">code &raquo;</a><span class="member"><a name="goog.evalWorksForGlobals_">goog.evalWorksForGlobals_</a> : <code class="type">?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Indicates whether or not we can call 'eval' directly to eval code in the
global scope. Set to a Boolean by the first call to goog.globalEval (which
empirically tests whether eval works for globals). @see goog.globalEval</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l47">code &raquo;</a><span class="member"><a name="goog.global">goog.global</a> : <code class="type">global this</code></span></div><p>Reference to the global context. In most cases this will be 'window'.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l326">code &raquo;</a><span class="member"><a name="goog.implicitNamespaces_">goog.implicitNamespaces_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code></span></div><p>Namespaces implicitly defined by goog.provide. For example,
goog.provide('goog.events.Event') implicitly declares that 'goog' and
'goog.events' must be namespaces.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l593">code &raquo;</a><span class="member"><a name="goog.included_">goog.included_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code></span></div><p>Object used to keep track of urls that have already been added. This record
allows the prevention of circular dependencies.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l576">code &raquo;</a><span class="member"><a name="goog.instantiatedSingletons_">goog.instantiatedSingletons_</a> : <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code></span></div><p>All singleton classes that have been instantiated, for testing. Don't read
it directly, use the <code >goog.testing.singleton</code> module. The compiler
removes this variable if unused.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l1076">code &raquo;</a><span class="member"><a name="goog.uidCounter_">goog.uidCounter_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Counter for UID.</summary></details></div></div></section><section id="compiler-constants"><h2>Compiler Constants</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l181">code &raquo;</a><span class="member"><a name="goog.DEBUG">goog.DEBUG</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div></summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l431">code &raquo;</a><span class="member"><a name="goog.ENABLE_DEBUG_LOADER">goog.ENABLE_DEBUG_LOADER</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div></summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l203">code &raquo;</a><span class="member"><a name="goog.LOCALE">goog.LOCALE</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div></summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/array/array.js.src.html#l42">code &raquo;</a><span class="member"><a name="goog.NATIVE_ARRAY_PROTOTYPES">goog.NATIVE_ARRAY_PROTOTYPES</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div></summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l227">code &raquo;</a><span class="member"><a name="goog.STRICT_MODE_COMPATIBLE">goog.STRICT_MODE_COMPATIBLE</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div></summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l217">code &raquo;</a><span class="member"><a name="goog.TRUSTED_SITE">goog.TRUSTED_SITE</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>No data</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>No data</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>No data</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>