IT:AD:Require.JS

Summary

Provides a way to load code files before invoking a method in it:

require(["helper/util"], function(util) {
//This function is called when scripts/helper/util.js is loaded.
//If util.js calls define(), then this function is not fired until
//util's dependencies have loaded, and the util argument will hold
//the module value for "helper/util".
});
  • LabJS
  • dojo.require
  • YepNope