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

Table of Contents

Error in the documentation? Can’t find what you are looking for? Let us know!