module

Classes

goog.module.AbstractModuleLoader
An interface that loads JavaScript modules.
goog.module.BaseModule
A basic module object that represents a module of Javascript code that can be dynamically loaded.
goog.module.Loader
The dynamic loading functionality is defined as a class. The class will be used as singleton. There is, however, a two step initialization procedure because parameters need to be passed to the goog.module.Loader instance.
goog.module.ModuleInfo
A ModuleInfo object is used by the ModuleManager to hold information about a module of js code that may or may not yet be loaded into the environment.
goog.module.ModuleLoadCallback
Class used to encapsulate the callbacks to be called when a module loads.
goog.module.ModuleLoader
A class that loads Javascript modules.
goog.module.ModuleManager
The ModuleManager keeps track of all modules in the environment. Since modules may not have their code loaded, we must keep track of them.

Public Protected Private

Global Functions

goog.module.initLoader(urlBaseopt_urlFunction)
Wrapper of init() so that we only need to export this single identifier instead of three. See method goog.module.Loader.init() for explanation of param.
Arguments:
urlBase : string
The URL of the base library.
opt_urlFunction : Function=
Function that creates the URL for the module file. It will be passed the base URL for module files and the module name and should return the fully-formed URL to the module file to load.
code »
goog.module.isNull_(eliarr) boolean
Checks if the given element is null.
Arguments:
el : Object
The element to check if null.
i : number
The index of the element.
arr : Array.<Object>
The array that contains the element.
Returns: boolean  TRUE iff the element is null.
code »
goog.module.loaderCall(modulesymbol) !Function
Produces a function that delegates all its arguments to a dynamically loaded function. This is used to export dynamically loaded functions.
Arguments:
module : string
The module to load from.
symbol : number | string
The ID of the symbol to load from the module. This symbol must resolve to a function.
Returns: !Function  A function that forwards all its arguments to the dynamically loaded function specified by module and symbol.
code »
goog.module.provide(moduleopt_symbolopt_object)
Wrapper of goog.module.Loader.provide() for use in modules See method goog.module.Loader.provide() for explanation of params.
Arguments:
module : string
The name of the module. Cf. parameter module of method require().
opt_symbol : number | string=
The symbol being defined, or nothing when all symbols of the module are defined. Cf. parameter symbol of method require().
opt_object : Object=
The object bound to the symbol, or nothing when all symbols of the module are defined.
code »
goog.module.require(modulesymbolcallback)
Wrapper of goog.module.Loader.require() for use in modules. See method goog.module.Loader.require() for explanation of params.
Arguments:
module : string
The name of the module. Usually, the value is defined as a constant whose name starts with MOD_.
symbol : number | string
The ID of the symbol. Usually, the value is defined as a constant whose name starts with SYM_.
callback : Function
This function will be called with the resolved symbol as the argument once the module is loaded.
code »
goog.module.requireMultipleSymbols(symbolRequestsfinalCb)
Requires symbols for multiple modules, and invokes a final callback on the condition that all of them are loaded. I.e. a barrier for loading of multiple symbols. If no symbols are required, the final callback is called immediately.
Arguments:
symbolRequests : Array.<Object>
A list of tuples of module, symbol, callback (analog to the arguments to require(), above). These will each be require()d individually. NOTE: This argument will be modified during execution of the function.
finalCb : Function
A function that is called when all required symbols are loaded.
code »
goog.module.requireMultipleSymbolsHelper_(symbolRequestsifinalCb)
Used by requireMultipleSymbols() to load each required symbol and keep track how many are loaded, and finally invoke the barrier callback when they are all done.
Arguments:
symbolRequests : Array.<Object>
Same as in requireMultipleSymbols().
i : number
The single module that is required in this invocation.
finalCb : Function
Same as in requireMultipleSymbols().
code »

Global Properties

goog.module.ModuleInfoTest :
No description.
Code »
goog.module.ModuleLoadCallbackTest :
No description.
Code »
goog.module.ModuleLoaderTest :
No description.
Code »
goog.module.ModuleManagerTest :
No description.
Code »
goog.module.testdata :
No description.
Code »

Package module

Package Reference