Sha256: 89cdb5b0ce9cc9b705ea634bedf0d1337b76ed526e44c9f663492f13a76b450a

Contents?: true

Size: 1.12 KB

Versions: 11

Compression:

Stored size: 1.12 KB

Contents

goog.provide('example.initializer.app');

goog.require('example.App');

goog.require('goog.module.ModuleLoader');
goog.require('goog.module.ModuleManager');

example.App.setButtonClickHandler(function(e) {
  var moduleManager = goog.module.ModuleManager.getInstance();
  moduleManager.execOnLoad('settings', this.onSettingsLoaded, this);
});

example.App.install('content');

var moduleManager = goog.module.ModuleManager.getInstance();
var moduleLoader = new goog.module.ModuleLoader();
moduleManager.setLoader(moduleLoader);
moduleManager.setAllModuleInfo(goog.global['MODULE_INFO']);
moduleManager.setModuleUris(goog.global['MODULE_URIS']);

// This tells the module manager that the 'app' module has been loaded.
// The module manager will not evaluate the code for any of app's
// dependencies until it knows it has been loaded.
moduleManager.setLoaded('app');

goog.exportSymbol('example.api.load', function(callback) {
  moduleManager.execOnLoad('api', callback);
});

goog.exportSymbol('example.api.isLoaded', function() {
  var moduleInfo = moduleManager.getModuleInfo('api');
  return moduleInfo ? moduleInfo.isLoaded() : false;
});

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
closure-1.5.6 scripts/modules/app_init.js
closure-1.5.5 scripts/modules/app_init.js
closure-1.5.4 scripts/modules/app_init.js
closure-1.5.3 scripts/modules/app_init.js
closure-1.5.2 scripts/modules/app_init.js
closure-1.5.1 scripts/modules/app_init.js
closure-1.5.0 scripts/modules/app_init.js
closure-1.4.3 scripts/modules/app_init.js
closure-1.4.2 scripts/modules/app_init.js
closure-1.3.1 scripts/modules/app_init.js
closure-1.3.0 scripts/modules/app_init.js