Navigating the Dojo API Tool
There are several different methods of navigating through the object structure of the Dojo Toolkit:
- Use the namespace list (to the left). The simplest method would be to use the list of namespaces
defined by the Dojo Toolkit, on the left side of every page.
- Drill-down from where you are. The API Tool was designed to give you as much information via drill-down
as possible. Everything defined in an object can be clicked on, for more information.
- Use the search. At the top of the namespace list to the left is a search box; type in the terms
you are looking for, and you will be taken to a result page that spans the entire toolkit.
In addition, objects with large numbers of contained types have a simple way of jumping to sections on a page; simply look
at the right side of any heading, and you will see a set of quick navigation icons. Clicking a type icon will take you to
that section; clicking the up arrow icon will return you to the top of the page.
Inherited and private members
The Dojo API Tool will show the full ancestry of an object's members (including how that member was defined and whether or not
it overrides an original). By default, all members of an object that are inherited are shown with the object's API listing,
and all private members are hidden.
To toggle either inherited or private members, look just beneath the breadcrumb bar (above the name of the object you are viewing)
and click the appropriate link.
Switching styles
The Dojo API Tool was designed with several themes in mind; we know that some people prefer light on dark, while others
might prefer dark on light. With this in mind, two themes (Noir and Blanc) are currently available, with more on the
way.
To switch visual styles, click on the theme you want to use, near the top right corner of the page. The API Tool will
remember which style you prefer and automatically load that theme on subsequent visits.
Key/Legend
Namespaces
A namespace in Dojo parlance is an object/property bag that can contain almost anything: constructors, methods, properties, etc. Usually is
expressly defined to serve a particular purpose; for example, dojo.date.locale is a namespace defined to deal with locale-specific
date handling.
Constructors
A constructor is a function designed to create instances of objects. With the Dojo Toolkit, there are two ways of creating constructors:
the "old school" way (i.e. defining a function with the this keyword in the body) or using dojo.declare.
Singletons
A singleton is a constructor that is defined and then immediately executed so that only one instance may ever exist during an application's
lifetime. Usually this is done to capture some information in the environment, or to ensure a set of private variables that cannot be accessed
from outside of the declaration. Examples include dojox.encoding.crypto.Blowfish.
Data Types
Array
Arrays are ordered lists, native to Javascript.
Boolean
Native data type representing a simple "true/false" value.
Date
Native Javascript data type to handle common date and time representations.
Node
An object that represents any kind of element being referenced/used by Javascript code. Note that the type of element is not dictated
by this data type; only that it is a node of some sort.
Error
A special, native Javascript object used to indicate an error in code. Can be subclassed and used in conjunction with the throw statement,
i.e. throw new MySubError(...);
Function
Functions/methods are pieces of invocable code; in JavaScript, they are also considered data and can be passed around like any other object.
Number
A Number object is used to represent any kind of numeric value; note that Javascript does not guarentee the actual underlying datatype
(though the most common is a 64-bit float).
Object
Objects are the base data type of Javascript. With the Dojo API Tool, a type that cannot be determined is usually marked with this icon,
in addition to straight objects.
RegExp (Regular Expression)
A regular expression is an object used for fast string search and parsing.
String
A string is any sequence of characters.