Dojo
Dojo is divided into two parts: dojo.js ,and the rest of Dojo Core. Typically,if a function or Class exists within the dojo namespace directly (eg: dojo.require() ,dojo.addOnLoad() ) it is provided directly by dojo.js . If the function or Class exists beneath the dojo namespace (eg: dojo.dnd.Mover ),you will need to require the appropriate module (eg: dojo.require("dojo.dnd.Mover"); )
These pages cover both cases,and indicate how they are provided.
Base Dojo: dojo.js
Dojo Base is the functionality you get by just including a stock built dojo.js or dojo.xd.js in your page.
@H_403_35@Configuring Dojo
-
Possibility to override certain global settings that control how the framework operates
Array utilities
Details on dojo.every,dojo.filter,dojo.forEach,dojo.indexOf,dojo.lastIndexOf,dojo.map,and dojo.some. See the Array QuickStart for an overview.
-
Invokes a callback function for every item in array
-
Applies a callback to each element of arr and returns an Array with the results
-
Iterate over an array,escaping when the callback returns true for some logic check.
-
Iterate over an array,escaping when the callback returns false for some logic check.
-
Iterate over an array,reducing the array based on the callback return.
-
Find the index of some element in an Array.
-
- NodeList.indexOf,NodeList.lastIndexOf,NodeList.forEach,NodeList.every,NodeList.some,NodeList.concat,NodeList.map,NodeList.filter,NodeList.at
Language Utilities
-
Communication between threads
-
Function that generates a wrapper function that ensures a function that will only ever execute in a defined scope.
-
Function that generates a wrapper function that ensures a function will only ever execute globally.
-
Returns a new object which “looks” to obj for properties which it does not have a value for.
-
Checks if the parameter is a String
-
Checks if the parameter is an Array
-
Checks if the parameter is a Function
-
Checks if the parameter is an Object
-
Checks if the parameter is like an Array
-
Checks if the parameter is a built-in function
String Utilities
-
Trim whitespace from a String
-
Simple templates with parameterized substitutions.
DOM
-
The swiss army knife of DOM node manipulation in Dojo.
-
A class to handle a list of DOM nodes. Most commonly returned from a dojo.query call.
-
Alias for the current document
-
Return the body element of the document
-
Select a DOM node by ‘id’
-
Manipulation
-
Creates a dom node with optional values and placement
-
Place DOM nodes relative to others
-
NodeList.place
Place DOM nodes in list relative to others
-
NodeList.orphan
-
NodeList.adopt
-
NodeList.clone
-
NodeList.addContent
-
Destroy a DOM element
-
Empty the contents of a DOM element
-
NodeList.empty
-
-
Attributes
-
Create an object from an form node
-
Modifying DOM node attributes
-
Set/Get attributes for nodes in the list
-
dojo.isDescendant
-
dojo.setSelectable
-
-
Styles
-
Getter for the coordinates (relative to parent and absolute) of a DOM node. Deprecated in Dojo 1.4.
-
NodeList.coords
Getter for the coordinates of each node in the list. Deprecated in Dojo 1.4.
-
Getter for the border-Box x/y coordinates and size of a DOM node.
-
NodeList.position
Calls dojo.position for each node in the list and returns those objects as an Array.
-
A getter/setter for styles on a DOM node
-
Return a cachable object of all computed styles for a node
-
Class Utilities
-
Returns a boolean depending on whether or not a node has a passed class string.
-
Adds a CSS class to a node.
-
Removes a class from a Node.
-
Toggles a className (or now in 1.4 an array of classNames).
-
-
Getter/setter for the margin-Box of node
-
Getter/setter for the content-Box of node
-
Effects
Events
-
Connects events to methods
-
Connects events to every node in the list,like dojo.connect
-
Common event names mapped as functions on a NodeList - eg: .onclick(function(){})
-
Disconnects methods from linked topics
-
Linked a listener to a named topic
-
Remove a topic listener
-
Publish an event to all subscribers of a topic
-
Ensure that everytime an event is called,a message is published on the topic.
-
Stop an event’s bubbling and propagation.
Document Lifecycle
-
Call functions after the DOM has finished loading and widgets declared in markup have been instantiated
-
1.4+ Alias for dojo.addOnLoad
-
Call functions when the page unloads
-
Call functions when window.onunload fires
-
Signal fired by impending window destruction
Ajax / IO
-
1.4+ Pre-defined XHR content handlers,and an extension point to add your own custom handling.
-
Core for all xhr* verbs,eg: xhrPost,getGet
Package System
-
Maps module name to a path
-
Loads a Javascript module from the appropriate URI
JSON Tools
-
Parses a JSON string to return a JavaScript object
-
Returns a JSON serialization of an object
Objects / OO Tools
-
Mixes one object into another. Can be used as a shallow copy
-
Creates a constructor using a compact notation for inheritance and prototype extension
-
Determine if an object supports a given method
-
Delegate an Object (beget)
-
Get a property from a dot-separated string,such as “A.B.C”
-
Set a property from a dot-separated string,such as “A.B.C”
-
Create classes out of each node in the list
Colors
-
Color object and utility functions to handle colors. Details on
-
dojo.colorFromArray
-
dojo.colorFromHex
-
dojo.colorFromString
-
dojo.colorFromRgb.
Miscellaneous Base
-
Log a debug message to indicate that a behavior has been deprecated
-
Evaluate some string of JavaScript
-
Alias for the global scope
-
A collection of key constants.
-
A string containing the current locale as defined by Dojo
-
Changes the behavior of many core Dojo functions that deal with namespace and DOM lookup
-
The current version number of Dojo
-
Call callback with documentObject as dojo.doc
-
Call callback with globalObject as dojo.global and globalObject.document as dojo.doc