Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojo/_base/_loader/loader.js

  • dojo._loadedModules

    • type
      Object
  • dojo._inFlightCount

    • type
      Number
  • dojo._hasResource

    • type
      Object
  • dojo._modulePrefixes

    • type
      Object
  • dojo._modulePrefixes.dojo

    • type
      Object
  • dojo._modulePrefixes.dojo.name

    • type
      String
  • dojo._modulePrefixes.dojo.value

    • type
      String
  • dojo._modulePrefixes.doh

    • type
      Object
  • dojo._modulePrefixes.doh.name

    • type
      String
  • dojo._modulePrefixes.doh.value

    • type
      String
  • dojo._modulePrefixes.tests

    • type
      Object
  • dojo._modulePrefixes.tests.name

    • type
      String
  • dojo._modulePrefixes.tests.value

    • type
      String
  • dojo._moduleHasPrefix

    • parameters:
      • module: (typeof String)
    • returns
      Boolean
    • summary
      checks to see if module has been established
    • type
      Function
  • dojo._getModulePrefix

    • parameters:
      • module: (typeof String)
    • returns
      String
    • summary
      gets the prefix associated with module
    • type
      Function
  • dojo._loadedUrls

    • type
      Array
  • dojo._postLoad

    • type
      bool
  • dojo._loaders

    • type
      Array
  • dojo._unloaders

    • type
      Array
  • dojo._loadNotifying

    • type
      bool
  • dojo

    • alias - dojo
  • dojo._loadPath

    • parameters:
      • relpath: (typeof String)
        A relative path to a script (no leading '/', and typically ending
        in '.js').
      • module: (typeof String)
        A module whose existance to check for after loading a path.  Can be
        used to determine success or failure of the load.
      • cb: (typeof Function)
        a callback function to pass the result of evaluating the script
    • returns
      Boolean
    • summary
      Load a Javascript module given a relative path
    • description
      Loads and interprets the script located at relpath, which is
      relative to the script root directory.  If the script is found but
      its interpretation causes a runtime exception, that exception is
      not caught by us, so the caller will see it.  We return a true
      value if and only if the script is found.
    • type
      Function
  • dojo._loadUri

    • parameters:
      • uri: (typeof String)
        a uri which points at the script to be loaded
      • cb: (typeof Function)
        a callback function to process the result of evaluating the script
        as an expression, typically used by the resource bundle loader to
        load JSON-style resources
    • returns
      Boolean|Boolean: contents? true : false
    • summary
      Loads JavaScript from a URI
    • description
      Reads the contents of the URI, and evaluates the contents.  This is
      used to load modules as well as resource bundles. Returns true if
      it succeeded. Returns false if the URI reading failed.  Throws if
      the evaluation throws.
    • type
      Function
  • dojo._loadUriAndCheck

    • parameters:
      • uri: (typeof String)
      • moduleName: (typeof String)
      • cb: (typeof Function)
    • returns
      Boolean
    • summary
      calls loadUri then findModule and returns true if both succeed
    • type
      Function
  • dojo.loaded

    • summary
      signal fired when initial environment and package loading is
      complete. You should use dojo.addOnLoad() instead of doing a
      direct dojo.connect() to this method in order to handle
      initialization tasks that require the environment to be
      initialized. In a browser host,	declarative widgets will
      be constructed when this function finishes runing.
    • type
      Function
  • dojo.unloaded

    • summary
      signal fired by impending environment destruction. You should use
      dojo.addOnUnload() instead of doing a direct dojo.connect() to this
      method to perform page/application cleanup methods. See
      dojo.addOnUnload for more info.
    • type
      Function
  • dojo._onto

    • parameters:
      • arr
      • obj
      • fn
    • type
      Function
  • dojo.ready

    • type
      Function
  • dojo.addOnLoad

    • parameters:
      • obj: (typeof Object)
      • functionName: (typeof String|Function)
    • summary
      Registers a function to be triggered after the DOM and dojo.require() calls
      have finished loading.
    • description
      Registers a function to be triggered after the DOM has finished
      loading and `dojo.require` modules have loaded. Widgets declared in markup
      have been instantiated if `djConfig.parseOnLoad` is true when this fires.
      
      Images and CSS files may or may not have finished downloading when
      the specified function is called.  (Note that widgets' CSS and HTML
      code is guaranteed to be downloaded before said widgets are
      instantiated, though including css resouces BEFORE any script elements
      is highly recommended).
    • example
      Register an anonymous function to run when everything is ready
      	dojo.addOnLoad(function(){ doStuff(); });
    • example
      Register a function to run when everything is ready by pointer:
      	var init = function(){ doStuff(); }
      	dojo.addOnLoad(init);
    • example
      Register a function to run scoped to `object`, either by name or anonymously:
      	dojo.addOnLoad(object, "functionName");
      	dojo.addOnLoad(object, function(){ doStuff(); });
    • type
      Function
  • dojo.config.addOnLoad

    • alias - dojo.config.addOnLoad
  • dojo._modulesLoaded

    • type
      Function
  • dojo._callLoaded

    • type
      Function
  • dojo._getModuleSymbols

    • parameters:
      • modulename: (typeof String)
    • returns
      Array
    • summary
      Converts a module name in dotted JS notation to an array
      representing the path in the source tree
    • type
      Function
  • dojo._global_omit_module_check

    • type
      bool
  • dojo.loadInit

    • parameters:
      • init: (typeof Function)
        a function reference. Executed immediately.
    • summary
      Executes a function that needs to be executed for the loader's dojo.requireIf
      resolutions to work. This is needed mostly for the xdomain loader case where
      a function needs to be executed to set up the possible values for a dojo.requireIf
      call.
    • description
      This function is mainly a marker for the xdomain loader to know parts of
      code that needs be executed outside the function wrappper that is placed around modules.
      The init function could be executed more than once, and it should make no assumptions
      on what is loaded, or what modules are available. Only the functionality in Dojo Base
      is allowed to be used. Avoid using this method. For a valid use case,
      see the source for dojox.gfx.
    • type
      Function
  • dojo._loadModule

    • type
      Function
  • dojo.require

    • parameters:
      • moduleName: (typeof String)
        module name to load, using periods for separators,
        e.g. "dojo.date.locale".  Module paths are de-referenced by dojo's
        internal mapping of locations to names and are disambiguated by
        longest prefix. See <code>dojo.registerModulePath()</code> for details on
        registering new modules.
      • omitModuleCheck: (typeof Boolean)
        if <code>true</code>, omitModuleCheck skips the step of ensuring that the
        loaded file actually defines the symbol it is referenced by.
        For example if it called as <code>dojo.require(&quot;a.b.c&quot;)</code> and the
        file located at <code>a/b/c.js</code> does not define an object <code>a.b.c</code>,
        and exception will be throws whereas no exception is raised
        when called as <code>dojo.require(&quot;a.b.c&quot;, true)</code>
    • summary
      loads a Javascript module from the appropriate URI
    • description
      Modules are loaded via dojo.require by using one of two loaders: the normal loader
      and the xdomain loader. The xdomain loader is used when dojo was built with a
      custom build that specified loader=xdomain and the module lives on a modulePath
      that is a whole URL, with protocol and a domain. The versions of Dojo that are on
      the Google and AOL CDNs use the xdomain loader.
      
      If the module is loaded via the xdomain loader, it is an asynchronous load, since
      the module is added via a dynamically created script tag. This
      means that dojo.require() can return before the module has loaded. However, this
      should only happen in the case where you do dojo.require calls in the top-level
      HTML page, or if you purposely avoid the loader checking for dojo.require
      dependencies in your module by using a syntax like dojo["require"] to load the module.
      
      Sometimes it is useful to not have the loader detect the dojo.require calls in the
      module so that you can dynamically load the modules as a result of an action on the
      page, instead of right at module load time.
      
      Also, for script blocks in an HTML page, the loader does not pre-process them, so
      it does not know to download the modules before the dojo.require calls occur.
      
      So, in those two cases, when you want on-the-fly module loading or for script blocks
      in the HTML page, special care must be taken if the dojo.required code is loaded
      asynchronously. To make sure you can execute code that depends on the dojo.required
      modules, be sure to add the code that depends on the modules in a dojo.addOnLoad()
      callback. dojo.addOnLoad waits for all outstanding modules to finish loading before
      executing.
      
      This type of syntax works with both xdomain and normal loaders, so it is good
      practice to always use this idiom for on-the-fly code loading and in HTML script
      blocks. If at some point you change loaders and where the code is loaded from,
      it will all still work.
      
      More on how dojo.require
      `dojo.require("A.B")` first checks to see if symbol A.B is
      defined. If it is, it is simply returned (nothing to do).
      
      If it is not defined, it will look for `A/B.js` in the script root
      directory.
      
      `dojo.require` throws an exception if it cannot find a file
      to load, or if the symbol `A.B` is not defined after loading.
      
      It returns the object `A.B`, but note the caveats above about on-the-fly loading and
      HTML script blocks when the xdomain loader is loading a module.
      
      `dojo.require()` does nothing about importing symbols into
      the current namespace.  It is presumed that the caller will
      take care of that.
    • example
      To use dojo.require in conjunction with dojo.ready:
      
      	dojo.require("foo");
      	dojo.require("bar");
      	dojo.addOnLoad(function(){
      		//you can now safely do something with foo and bar
      	});
    • example
      For example, to import all symbols into a local block, you might write:
      
      	with (dojo.require("A.B")) {
      		...
      	}
      
      And to import just the leaf symbol to a local variable:
      
      	var B = dojo.require("A.B");
      	...
    • return_summary
      the required namespace object
    • type
      Function
  • dojo.provide

    • parameters:
      • resourceName: (typeof String)
        A dot-sperated string identifying a resource.
    • returns
      Object
    • summary
      Register a resource with the package system. Works in conjunction with <code>dojo.require</code>
    • description
      Each javascript source file is called a resource.  When a
      resource is loaded by the browser, `dojo.provide()` registers
      that it has been loaded.
      
      Each javascript source file must have at least one
      `dojo.provide()` call at the top of the file, corresponding to
      the file name.  For example, `js/dojo/foo.js` must have
      `dojo.provide("dojo.foo");` before any calls to
      `dojo.require()` are made.
      
      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.
    • example
      Safely create a `my` object, and make dojo.require("my.CustomModule") work
      	dojo.provide("my.CustomModule");
    • type
      Function
  • dojo.platformRequire

    • parameters:
      • modMap: (typeof Object)
    • summary
      require one or more modules based on which host environment
      Dojo is currently operating in
    • description
      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.
    • example
      	dojo.platformRequire({
      		browser: [
      			"foo.sample", // simple module
      			"foo.test",
      			["foo.bar.baz", true] // skip object check in _loadModule (dojo.require)
      		],
      		default: [ "foo.sample._base" ],
      		common: [ "important.module.common" ]
      	});
    • type
      Function
  • dojo.requireIf

    • parameters:
      • condition: (typeof Boolean)
      • resourceName: (typeof String)
    • summary
      If the condition is true then call <code>dojo.require()</code> for the specified
      resource
    • example
      	dojo.requireIf(dojo.isBrowser, "my.special.Module");
    • type
      Function
  • dojo.requireAfterIf

    • alias - dojo.requireIf
  • dojo.registerModulePath

    • parameters:
      • module: (typeof String)
      • prefix: (typeof String)
    • summary
      Maps a module name to a path
    • description
      An unregistered module is given the default path of ../[module],
      relative to Dojo root. For example, module acme is mapped to
      ../acme.  If you want to use a different module name, use
      dojo.registerModulePath.
    • example
      If your dojo.js is located at this location in the web root:
      	/myapp/js/dojo/dojo/dojo.js
      and your modules are located at:
      	/myapp/js/foo/bar.js
      	/myapp/js/foo/baz.js
      	/myapp/js/foo/thud/xyzzy.js
      Your application can tell Dojo to locate the "foo" namespace by calling:
      	dojo.registerModulePath("foo", "../../foo");
      At which point you can then use dojo.require() to load the
      modules (assuming they provide() the same things which are
      required). The full code might be:
      	<script type="text/javascript"
      		src="/myapp/js/dojo/dojo/dojo.js"></script>
      	<script type="text/javascript">
      		dojo.registerModulePath("foo", "../../foo");
      		dojo.require("foo.bar");
      		dojo.require("foo.baz");
      		dojo.require("foo.thud.xyzzy");
      	</script>
    • type
      Function
  • dojo.requireLocalization

    • parameters:
      • moduleName: (typeof String)
        name of the package containing the &quot;nls&quot; directory in which the
        bundle is found
      • bundleName: (typeof String)
        bundle name, i.e. the filename without the '.js' suffix. Using &quot;nls&quot; as a
        a bundle name is not supported, since &quot;nls&quot; is the name of the folder
        that holds bundles. Using &quot;nls&quot; as the bundle name will cause problems
        with the custom build.
      • locale: (typeof String)
        the locale to load (optional)  By default, the browser's user
        locale as defined by dojo.locale
      • availableFlatLocales: (typeof String)
        A comma-separated list of the available, flattened locales for this
        bundle. This argument should only be set by the build process.
    • summary
      Declares translated resources and loads them if necessary, in the
      same style as dojo.require.  Contents of the resource bundle are
      typically strings, but may be any name/value pair, represented in
      JSON format.  See also <code>dojo.i18n.getLocalization</code>.
    • description
      Load translated resource bundles provided underneath the "nls"
      directory within a package.  Translated resources may be located in
      different packages throughout the source tree.
      
      Each directory is named for a locale as specified by RFC 3066,
      (http://www.ietf.org/rfc/rfc3066.txt), normalized in lowercase.
      Note that the two bundles in the example do not define all the
      same variants.  For a given locale, bundles will be loaded for
      that locale and all more general locales above it, including a
      fallback at the root directory.  For example, a declaration for
      the "de-at" locale will first load `nls/de-at/bundleone.js`,
      then `nls/de/bundleone.js` and finally `nls/bundleone.js`.  The
      data will be flattened into a single Object so that lookups
      will follow this cascading pattern.  An optional build step can
      preload the bundles to avoid data redundancy and the multiple
      network hits normally required to load these resources.
    • example
      A particular widget may define one or more resource bundles,
      structured in a program as follows, where moduleName is
      mycode.mywidget and bundleNames available include bundleone and
      bundletwo:
      		...
      	mycode/
      		mywidget/
      			nls/
      				bundleone.js (the fallback translation, English in this example)
      				bundletwo.js (also a fallback translation)
      				de/
      					bundleone.js
      					bundletwo.js
      				de-at/
      					bundleone.js
      				en/
      					(empty; use the fallback translation)
      				en-us/
      					bundleone.js
      				en-gb/
      					bundleone.js
      				es/
      					bundleone.js
      					bundletwo.js
      				  ...etc
      				...
    • type
      Function
  • dojo._Url

    • summary
      Constructor to create an object representing a URL.
      It is marked as private, since we might consider removing
      or simplifying it.
    • description
      Each argument is evaluated in order relative to the next until
      a canonical uri is produced. To get an absolute Uri relative to
      the current document use:
      new dojo._Url(document.baseURI, url)
    • type
      Function
  • dojo._Url.uri

    • type
      Object
  • dojo._Url.scheme

  • dojo._Url.authority

  • dojo._Url.path

  • dojo._Url.query

  • dojo._Url.fragment

  • dojo._Url.user

    • type
      Object
  • dojo._Url.password

    • type
      Object
  • dojo._Url.host

    • type
      Object
  • dojo._Url.port

    • type
      Object
  • dojo._Url.toString

    • type
      Function
  • dojo.moduleUrl

    • parameters:
      • module: (typeof String)
      • url: (typeof dojo._Url||String)
    • returns
      dojo._Url
    • summary
      Returns a <code>dojo._Url</code> object relative to a module.
    • example
      	var pngPath = dojo.moduleUrl("acme","images/small.png");
      	console.dir(pngPath); // list the object properties
      	// create an image and set it's source to pngPath's value:
      	var img = document.createElement("img");
      	// NOTE: we assign the string representation of the url object
      	img.src = pngPath.toString();
      	// add our image to the document
      	dojo.body().appendChild(img);
    • example
      you may de-reference as far as you like down the package
      hierarchy.  This is sometimes handy to avoid lenghty relative
      urls or for building portable sub-packages. In this example,
      the `acme.widget` and `acme.util` directories may be located
      under different roots (see `dojo.registerModulePath`) but the
      the modules which reference them can be unaware of their
      relative locations on the filesystem:
      	// somewhere in a configuration block
      	dojo.registerModulePath("acme.widget", "../../acme/widget");
      	dojo.registerModulePath("acme.util", "../../util");
      
      	// ...
      
      	// code in a module using acme resources
      	var tmpltPath = dojo.moduleUrl("acme.widget","templates/template.html");
      	var dataPath = dojo.moduleUrl("acme.util","resources/data.json");
    • type
      Function
  • define

    • parameters:
      • name
      • deps
      • def
    • returns
      g, ".");
    • type
      Function
  • define.vendor

    • type
      String
  • define.version

    • alias - dojo.version