Login Register Help
API Documentation
Choose a stylesheet:

Functiondojo.provide (returns Object)

dojo.require("dojo._base._loader.loader_debug");

Each javascript source file is called a resource. When a resource is loaded by the browser, dojo.provide() registers that it has been loaded.

For backwards compatibility reasons, in addition to registering the resource, dojo.provide() also ensures that the javascript object for the module exists. For example, dojo.provide("dojox.data.FlickrStore"), in addition to registering that FlickrStore.js is a resource for the dojox.data module, will ensure that the dojox.data javascript object exists, so that calls like dojo.data.foo = function(){ ... } don’t fail.

In the case of a build where multiple javascript source files are combined into one bigger file (similar to a .lib or .jar file), that file may contain multiple dojo.provide() calls, to note that it includes multiple resources.

parametertypedescription
resourceNameString 

Usage

var foo: Object=dojo.provide(resourceName: String);