dojo.platformRequire
<script src="../../js/dojo.js"></script>
defined in dojo/_base/_loader/loader.js
This method takes a "map" of arrays which one can use to optionally load dojo modules. The map is indexed by the possible dojo.name_ values, with two additional values: "default" and "common". The items in the "default" array will be loaded if none of the other items have been choosen based on dojo.name_, set by your host environment. The items in the "common" array will always be loaded, regardless of which list is chosen.
Usage
function (/*Object*/ modMap) (view source)
parameter | type | description |
---|---|---|
modMap | Object |
Examples
Example 1
dojo.platformRequire({
browser: [
"foo.sample", // simple module
"foo.test",
["foo.bar.baz", true] // skip object check in _loadModule
],
default: [ "foo.sample._base" ],
common: [ "important.module.common" ]
});