dojo.provide
resource is loaded by the browser, dojo.provide()
registers
that it has been loaded.
Each javascript source file is called a resource. When a
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.
For backwards compatibility reasons, in addition to registering
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.
In the case of a build where multiple javascript source files
Usage
parameter | type | description |
---|---|---|
resourceName |