Namespacedojo

Jump to PropertiesJump to FunctionsJump to ConstructorsNamespacesBack to top

Browser history management resources
transformation of relevant pieces of the Unicode.org Common Locale Data Repository (see http://unicode.org/cldr) to JSON from the original XML with associated utility classes
Color utilities
localized formatting and parsing routines for currencies
A uniform data access layer
Date manipulation utilities
Drag and Drop resources
Effects library on top of Base animations
Utility classes to enable loading of resources for internationalization (i18n)
Additional I/O transports (Ajax)
localized formatting and parsing routines for Number
The Dom/Widget parsing package
Regular expressions and Builder resources
Dojo remote-procedure-call resources
String utilities for Dojo

Jump to PropertiesJump to FunctionsJump to NamespacesConstructorsBack to top

Constructordojo.AdapterRegistry(returnWrappers: Boolean?)
A registry to make contextual calling/searching easier.
Returns an animation that will transition the properties of node defined in 'args' depending how they are defined in 'args.properties'
takes a named string, hex string, array of rgb or rgba values, an object with r, g, b, and a properties, or another dojo.Color object
Constructordojo.Deferred(canceller: Function?)
Encapsulates a sequence of callbacks in response to a value that may not yet be available. This is modeled after the Deferred class from Twisted <http://twistedmatrix.com>.
Constructordojo.DeferredList(list: Array, fireOnOneCallback: Boolean?, fireOnOneErrback: Boolean?, consumeErrors: Boolean?, canceller: Function?)
Provides event handling for a group of Deferred objects.
signal fired when initial environment and package loading is complete. You may use dojo.addOnLoad() or 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.
dojo.NodeList is as subclass of Array which adds syntactic sugar for chaining, common iteration operations, animation, and node manipulation. NodeLists are most often returned as the result of dojo.query() calls.
A generic animation class that fires callbacks into its handlers object at various states. Nearly all dojo animation functions return an instance of this method, usually without calling the .play() method beforehand. Therefore, you will likely need to call .play() on instances of dojo._Animation when one is returned.
Constructordojo._Line(start: Integer, end: Integer)
dojo._Line is the object used to generate values from a start value to an end value
Constructor to create an object representing a URL. It is marked as private, since we might consider removing or simplifying it.
Internal xd loader function. Clears the interval timer used to check on the status of in-flight xd module resource requests.
Internal xd loader function. Resets the xd state.
Internal xd loader function. Monitors in-flight requests for xd module resources.
Constructordojo.__FadeArgs(node: DOMNode|String, duration: Integer?, easing: Function?)
Constructordojo.__IoCallbackArgs(args: Object, xhr, url: String, query: String, handleAs: String, id: String, canDelete: Boolean, json: Object)
In addition to the properties listed for the dojo._IoArgs type, the following properties are allowed for dojo.xhr* methods.

Jump to PropertiesJump to ConstructorsJump to NamespacesFunctionsBack to top

Functiondojo.addClass(node: DomNode|String, classStr: String)
Adds the specified classes to the end of the class list on the passed node.
Registers a function to be triggered after the DOM has finished loading and widgets declared in markup have been instantiated. 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.)
registers a function to be triggered when the page unloads
Functiondojo.anim(node: DOMNode|String, properties: Object, duration: Integer?, easing: Function?, onEnd: Function?, delay: Integer?)
A simpler interface to `dojo.animateProperty()`, also returns an instance of `dojo._Animation` but begins the animation immediately, unlike nearly every other Dojo animation API.
Functiondojo.attr(node: DomNode|String, name: String|Object, value: String?)
Gets or sets an attribute on an HTML element.
Functiondojo.blendColors(start: dojo.Color, end: dojo.Color, weight: Number, obj: dojo.Color?)
blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend, can reuse a previously allocated dojo.Color object for the result
Return the body element of the document return the body object associated with dojo.doc
Returns DOM node with matching `id` attribute or `null` if not found, similar to "$" function in another library. If `id` is a DomNode, this function is a no-op.
Clones objects (including DOM nodes) and all children. Warning: do not clone cyclic structures.
builds a color from 1, 2, 3, or 4 element array
converts a hex string with a '#' prefix to a color object. Supports 12-bit #rgb shorthand.
get rgb(a) array from css-style color declarations
parses str for a color value.
Functiondojo.connect(obj: Object, event: String, context: Object, method: String|Function, dontFix: Boolean)
Create a link that calls one function when another executes.
Functiondojo.connectPublisher(topic: String, obj: Object, event: String)
Ensure that everytime obj.event() is called, a message is published on the topic. Returns a handle which can be passed to dojo.disconnect() to disable subsequent automatic publication on the topic.
Getter/setter for the content-box of node.
Functiondojo.cookie(name: String, value: String?, props: dojo.__cookieProps?)
Get or set a cookie.
Functiondojo.coords(node: DomNode|String, includeScroll: Boolean?)
Returns an object that measures margin box width/height and absolute positioning data from dojo._abs().
Functiondojo.declare(className: String, superclass: Function, props: Object)
Create a feature-rich constructor from compact notation
Functiondojo.delegate(obj, props)
Functiondojo.deprecated(behaviour: String, extra: String?, removal: String?)
Log a debug message to indicate that a behavior has been deprecated.
Remove a link created by dojo.connect.
Functiondojo.eval(scriptFragment: String)
Perform an evaluation in the global scope. Use this rather than calling 'eval()' directly.
Functiondojo.every(arr: Array|String, callback: Function|String, thisObject: Object?)
Determines whether or not every item in arr satisfies the condition implemented by callback.
Functiondojo.exists(name: String, obj: Object?)
determine if an object supports a given method
Functiondojo.exit(exitcode)
Functiondojo.experimental(moduleName: String, extra: String?)
Marks code as experimental.
Functiondojo.extend(constructor: Object, props: Object...)
Adds all properties and methods of props to constructor's prototype, making them available to all instances created with
Returns an animation that will fade node defined in 'args' from its current opacity to fully opaque.
Returns an animation that will fade node defined in 'args' from its current opacity to fully transparent.
Functiondojo.filter(arr: Array, callback: Function|String, thisObject: Object?)
Returns a new Array with those items from arr that match the condition implemented by callback.
Functiondojo.fixEvent(evt, sender: DOMNode)
normalizes properties on the event object including event bubbling methods, keystroke normalization, and x/y positions
Functiondojo.forEach(arr: Array|String, callback: Function|String, thisObject: Object?)
for every item in arr, callback is invoked. Return values are ignored.
Functiondojo.formToJson(formNode: DOMNode|String, prettyPrint: Boolean?)
return a serialized JSON string from a form node or string ID identifying the form to serialize
dojo.formToObject returns the values encoded in an HTML form as string properties in an object which it then returns. Disabled form elements, buttons, and other non-value form elements are skipped. Multi-select elements are returned as an array of string values.
Returns a URL-encoded string representing the form passed as either a node or string ID identifying the form to serialize
Parses a [JSON](http://json.org) string to return a JavaScript object.
Returns a "computed style" object.
Functiondojo.getObject(name: String, create: Boolean, context: Object)
Get a property from a dot-separated string, such as "A.B.C"
Returns true if the requested attribute is specified on the given element, and false otherwise.
Functiondojo.hasClass(node: DomNode|String, classStr: String)
Returns whether or not the specified classes are a portion of the class list currently applied to the node.
Functiondojo.hitch(scope: Object, method: Function...)
Returns a function that will only ever execute in the a given scope. This allows for easy use of object member functions in callbacks and other places in which the "this" keyword may otherwise not reference the expected scope. Any number of default positional arguments may be passed as parameters beyond "method". Each of these values will be used to "placehold" (similar to curry) for the hitched function.
Functiondojo.indexOf(array: Array, value: Object, fromIndex: Integer?, findLast: Boolean?)
locates the first index of the provided value in the passed array. If the value is not found, -1 is returned.
Returns true if it is a built-in function or some other kind of oddball that *should* report as a function but doesn't
Return true if it is an Array
similar to dojo.isArray() but more permissive
Returns true if node is a descendant of ancestor
Return true if it is a Function
Returns true if it is a JavaScript object (or an Array, a Function or null)
Return true if it is a String
Functiondojo.lastIndexOf(array: Array, value: Object, fromIndex: Integer?)
locates the last index of the provided value in the passed array. If the value is not found, -1 is returned.
Functiondojo.map(arr: Array|String, callback: Function|String, thisObject: Function?)
applies callback to each element of arr and returns an Array with the results
Getter/setter for the margin-box of node.
Functiondojo.mixin(obj: Object, props: Object...)
Adds all properties and methods of props to obj and returns the (now modified) obj.
Returns a `dojo._Url` object relative to a module.
takes a name/value mapping object and returns a string representing a URL-encoded version of that object.
Functiondojo.partial(method: Function...)
similar to hitch() except that the scope object is left to be whatever the execution context eventually becomes.
Functiondojo.place(node: String|DomNode, refNode: String|DomNode, position: String|Number)
Attempt to insert node into the DOM, choosing from various positioning options. Returns true if successful, false otherwise.
require one or more modules based on which host environment Dojo is currently operating in
Functiondojo.provide(resourceName)
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.
Functiondojo.publish(topic: String, args: Array)
Invoke all listener method subscribed to topic.
Functiondojo.query(query: String, root: String|DOMNode?)
Returns nodes which match the given CSS3 selector, searching the entire document by default but optionally taking a node to scope the search by. Returns an instance of dojo.NodeList.
Sends an HTTP POST request to the server. In addtion to the properties listed for the dojo.__XhrArgs type, the following property is allowed: postData: String. The raw data to send in the body of the POST request.
Sends an HTTP PUT request to the server. In addtion to the properties listed for the dojo.__XhrArgs type, the following property is allowed: putData: String. The raw data to send in the body of the PUT request.
maps a module name to a path
Removes an attribute from an HTML element.
Removes the specified classes from node.
Functiondojo.require(moduleName: String, omitModuleCheck: Boolean?)
loads a Javascript module from the appropriate URI
Functiondojo.requireIf(condition: Boolean, resourceName: String)
If the condition is true then call dojo.require() for the specified resource
Functiondojo.requireLocalization(moduleName: String, bundleName: String, locale: String?, availableFlatLocales: String)
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 dojo.i18n.getLocalization.
Functiondojo.setContext(globalObject: Object, globalDocument: DocumentElement)
changes the behavior of many core Dojo functions that deal with namespace and DOM lookup, changing them to work in a new global context (e.g., an iframe). The varibles dojo.global and dojo.doc are modified as a result of calling this function and the result of `dojo.body()` likewise differs.
Functiondojo.setObject(name: String, value: Object, context: Object?)
Set a property from a dot-separated string, such as "A.B.C"
enable or disable selection on a node
Functiondojo.some(arr: Array|String, callback: Function|String, thisObject: Object?)
Determines whether or not any item in arr satisfies the condition implemented by callback.
prevents propagation and clobbers the default action of the passed event
Functiondojo.style(node: DomNode|String, style: Object?, value: String?)
Accesses styles on a node. If 2 arguments are passed, acts as a getter. If 3 arguments are passed, acts as a setter.
Functiondojo.subscribe(topic: String, context: Object, method: String|Function)
Attach a listener to a named topic. The listener function is invoked whenever the named topic is published (see: dojo.publish). Returns a handle which is needed to unsubscribe this listener.
Functiondojo.toggleClass(node: DomNode|String, classStr: String, condition: Boolean?)
Adds a class to node if not present, or removes if present. Pass a boolean condition if you want to explicitly add or remove.
Functiondojo.toJson(it: Object, prettyPrint: Boolean?, _indentStr: String?)
Returns a [JSON](http://json.org) serialization of an object.
trims whitespaces from both sides of the string
signal fired by impending environment destruction. You may use dojo.addOnUnload() or dojo.connect() to this method to perform page/application cleanup methods.
Remove a topic listener.
Functiondojo.withDoc(documentObject: Object, callback: Function, thisObject: Object?, cbArguments: Array?)
Call callback with documentObject as dojo.doc. If provided,
Functiondojo.withGlobal(globalObject: Object, callback: Function, thisObject: Object?, cbArguments: Array?)
Call callback with globalObject as dojo.global and
Functiondojo.xdRequireLocalization(moduleName: String, bundleName: String, locale: String?, availableFlatLocales: String)
Internal xd loader function. The xd version of dojo.requireLocalization.
Functiondojo.xhr(method: String, args: dojo.__XhrArgs, hasBody: Boolean?)
Sends an HTTP request with the given method. If the request has an HTTP body, then pass true for hasBody. The method argument should be uppercase. Also look at dojo.xhrGet(), xhrPost(), xhrPut() and dojo.xhrDelete() for shortcuts for those HTTP methods. There are also methods for "raw" PUT and POST methods via dojo.rawXhrPut() and dojo.rawXhrPost() respectively.
Sends an HTTP DELETE request to the server.
Sends an HTTP GET request to the server.
Sends an HTTP POST request to the server.
Sends an HTTP PUT request to the server.
Functiondojo._abs(node: DomNode, includeScroll: Boolean?)
Gets the position of the passed element relative to the viewport (if includeScroll==false), or relative to the document root (if includeScroll==true). Returns an object of the form: { x: 100, y: 300 } if includeScroll is passed, the x and y values will include any document offsets that may affect the position relative to the viewport.
The default easing function for dojo._Animation(s)
Functiondojo._delegate(obj, props)
removes node from its parent, clobbers it and all of its children.
Functiondojo._disconnect(obj, event, handle, listener)
Adds escape sequences for non-visual characters, double quote and backslash and surrounds with double quotes to form a valid string literal.
Functiondojo._everyOrSome(every: Boolean, arr: Array|String, callback: Function|String, thisObject: Object?)
Returns an animation that will fade the node defined by
Functiondojo._filterQueryResult(nodeList, simpleFilter)
Functiondojo._fireCallback(callback, context, cbArguments)
factory method to get a Google Gears plugin instance to expose in the browser runtime environment, if present
Functiondojo._getBorderBox(node, computedStyle)
Functiondojo._getContentBox(node, computedStyle)
Returns an object that encodes the width, height, left and top positions of the node's content box, irrespective of the current box model.
The following values in IE contain an offset: event.clientX event.clientY node.getBoundingClientRect().left node.getBoundingClientRect().top But other position related values do not contain this offset, such as node.offsetLeft, node.offsetTop, node.style.left and node.style.top. The offset is always (2, 2) in LTR direction. When the body is in RTL direction, the offset counts the width of left scroll bar's width. This function computes the actual offset.
Functiondojo._getMarginBox(node: DomNode, computedStyle: Object)
Functiondojo._getMarginExtents(n, computedStyle)
Converts a module name in dotted JS notation to an array representing the path in the source tree
Returns the current opacity of the passed node as a floating-point value between 0 and 1.
Functiondojo._getPadExtents(n: DomNode, computedStyle: Object)
Returns object with special values specifically useful for node fitting. * l/t = left/top padding (respectively) * w = the total of the left and right padding * h = the total of the top and bottom padding If 'node' has position, l/t forms the origin for child nodes. The w/h are used for calculating boxes. Normally application code will not need to invoke this directly, and will use the ...box... functions instead.
Functiondojo._getProp(parts: Array, create: Boolean, context: Object)
Functiondojo._getText(uri, fail_ok: Boolean)
Read the contents of the specified uri and return those contents.
Functiondojo._hitchArgs(scope, method)
Functiondojo._ieDispatcher(args, sender)
Adds query params discovered by the io deferred construction to the URL. Only use this for operations which are fundamentally GET-type operations.
Cancels all pending IO requests, regardless of IO type (xhr, script, iframe).
Functiondojo._ioSetArgs(args: dojo.__IoArgs, canceller: Function, okHandler: Function, errHandler: Function)
sets up the Deferred and ioArgs property on the Deferred so it can be used in an io call.
Functiondojo._ioWatch(dfd, validCheck: Function, ioCheck: Function, resHandle: Function)
watches the io request represented by dfd to see if it completes.
Functiondojo._loadPath(relpath: String, module: String?, cb: Function?)
Load a Javascript module given a relative path
Loads JavaScript from a URI
Functiondojo._loadUriAndCheck(uri: String, moduleName: String, cb: Function?)
calls loadUri then findModule and returns true if both succeed
Functiondojo._mixin(obj: Object, props: Object)
Adds all properties and methods of props to obj. This addition is "prototype extension safe", so that instances of objects will not pass along prototype defaults.
Functiondojo._setBox(node: DomNode, l: Number?, t: Number?, w: Number?, h: Number?, u: String?)
sets width/height/left/top in the current (native) box-model dimentions. Uses the unit passed in u.
Functiondojo._setContentSize(node: DomNode, widthPx: Number, heightPx: Number, computedStyle: Object)
Sets the size of the node's contents, irrespective of margins, padding, or borders.
Functiondojo._setMarginBox(node: DomNode, leftPx: Number?, topPx: Number?, widthPx: Number?, heightPx: Number?, computedStyle: Object)
sets the size of the node's margin box and placement (left/top), irrespective of box model. Think of it as a passthrough to dojo._setBox that handles box-model vagaries for you.
Functiondojo._setOpacity(node: DOMNode, opacity: Number)
set the opacity of the passed node portably. Returns the new opacity of the node.
Functiondojo._toArray(obj: Object, offset: Number?, startWith: Array?)
Converts an array-like object (i.e. arguments, DOMCollection) to an array. Returns a new Array with the elements of obj.
Functiondojo._toPixelValue(element, value, avalue)
True if the node uses border-box layout.
Functiondojo._xdCreateResource(contents: String, resourceName: String, resourcePath: String)
Internal xd loader function. Creates an xd module source given an non-xd module contents.
Internal xd loader function. Does a depth first, breadth second search and eval of required modules.
Figure out whether the path is local or x-domain If there is a colon before the first / then, we have a URL with a protocol.
Functiondojo._xdLoadFlattenedBundle(moduleName: String, bundleName: String, locale: String?, bundleData: Object)
Internal xd loader function. Used when loading a flattened localized bundle via a script tag.
Internal xd loader function. Called by an xd module resource when it has been loaded via a script tag.
Internal xd loader function. Determines what to do with a dependency that was listed in an xd version of a module contents.
Internal xd loader function. Walks the requires and evaluates module resource contents in the right order.
does the work of portably generating a new XMLHTTPRequest object.

Jump to FunctionsJump to ConstructorsJump to NamespacesPropertiesBack to top

The root relative path to dojo.js (as a string)
Alias for the current document. 'dojo.doc' can be modified for temporary context shifting. Also see dojo.withDoc().
Alias for the global scope (e.g. the window object in a browser).
True if the client is a web-browser
Greater than zero if client is FireFox. 0 otherwise. Corresponds to major detected FireFox version (1.5, 2, 3, etc.)
True if client is using Google Gears
Greater than zero if client is MSIE(PC). 0 otherwise. Corresponds to major detected IE version (6, 7, 8, etc.)
Greater than zero if client is a KTHML-derived browser (Konqueror, Safari, etc.). 0 otherwise. Corresponds to major detected version.
Greater than zero if client is a Mozilla-based browser (Firefox, SeaMonkey). 0 otherwise. Corresponds to major detected version.
Greater than zero if client is Opera. 0 otherwise. Corresponds to major detected version.
Greater than zero if client is Safari or iPhone. 0 otherwise.
Detect spidermonkey
definitions for common key values
the locale as defined by Dojo (read-only)
D.O.H. Test files for Dojo unit testing.
version number of dojo