The functions listed in Table 11-4 are too commonly used not
to especially call out. They're available as part of Dijit Base and
get pulled in whenever you require Dijit resources into the page. You
can also fetch them by issuing a dojo.require("dijit.dijit")
statement, as
they are included in the standard build profile, which you'll read
more about in Chapter 16.
Tip
For comprehensive API documentation, visit Dojo's online documentation at http://api.dojotoolkit.org.
Table 11-4. Commonly used Dijit functions
Function/Member | Comment |
---|---|
| The registry contains a
complete record of all dijits that are on the page and may be
used to explicitly iterate through them, to check for the
existence of a particular dijit, etc. For example, you could
uniformly manipulate every dijit on a page via the |
| Given a node, returns the dijit that represents this node. |
| Given a node, returns
the dijit whose DOM tree contains this node. This method is
especially handy for situations in which you need a quick
reference to a dijit via a DOM event. For example, you might
use this method to easily find a dijit via the |
| Returns the dimensions and scroll position of the viewable area of a browser windowâextremely useful for programmatically placing objects on the screen when the exact screen resolution or window size cannot be assumed. Often used in animations. |
| Looks up a dijit on the
page by the |
While these aren't the only API methods you'll want to be aware of, they're some of the most common ones, and they will save you a lot of time if you can remember that they exist.
Get Dojo: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.