dojo.require¶
Deprecated. Use require()
instead.
Old code:
dojo.require("dijit.form.Button");
dojo.require("dojox.layout.ContentPane");
...
CODE HERE
New code:
require(["dijit/form/Button", "dojox/layout/ContentPane", ...], function(Button, ContentPane, ...){
CODE HERE
});
Notice how the dots (ex: dijit.form.Button) have been changed to slashes (ex: “dijit/form/Button”).
See Also¶
- Modern Dojo Tutorial
- Hello Dojo Tutorial
- The Dojo Loader - Further information on the loading process