Login Register Help
API Documentation
Choose a stylesheet:

Namespacedojo

 

Jump to PropertiesJump to FunctionsJump to ConstructorsNamespacesBack to top

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
Namespacedojo.cookie(name: String, value: String?, props: dojo.__cookieProps?): String or undefined
Get or set a cookie.
localized formatting and parsing routines for currencies
A uniform data access layer
Date manipulation utilities
Namespacedojo.declare(className: String, superclass: Function|Function[], props: Object): Function
Create a feature-rich constructor from compact notation
Drag and Drop resources
Alias for the current document. 'dojo.doc' can be modified for temporary context shifting. Also see dojo.withDoc().
Effects library on top of Base animations
Alias for the global scope (e.g. the window object in a browser).
Utility classes to enable loading of resources for internationalization (i18n)
Additional I/O transports (Ajax)
definitions for common key values
localized formatting and parsing routines for Number
Regular expressions and Builder resources
Dojo remote-procedure-call resources
String utilities for Dojo
version number of dojo major: Integer Major version. If total version is "1.2.0beta1", will be 1 minor: Integer Minor version. If total version is "1.2.0beta1", will be 2 patch: Integer Patch version. If total version is "1.2.0beta1", will be 0 flag: String Descriptor flag. If total version is "1.2.0beta1", will be "beta1" revision: Number The SVN rev from which dojo was pulled

Jump to PropertiesJump to FunctionsJump to NamespacesConstructorsBack to top

Returns an animation that will transition the properties of node defined in 'args' depending how they are defined in 'args.properties'
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.
loads a Javascript module from the appropriate URI
signal fired by impending window destruction. You may use dojo.addOnWIndowUnload() or dojo.connect() to this method to perform page/application cleanup methods. See dojo.addOnWindowUnload for more info.
gets the prefix associated with module
Internal xd loader function. Overrides loadUri() from loader.js. xd loading requires slightly different behavior from loadPath().
checks to see if module has been established
Internal xd loader function. Clears the interval timer used to check on the status of in-flight xd module resource requests.
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.
Internal xd loader function. Resets the xd state.
Internal xd loader function. Monitors in-flight requests for xd module resources.
Constructordojo.__AnimArgs(node, duration, easing)

Jump to PropertiesJump to ConstructorsJump to NamespacesFunctionsBack to top

Adds the specified classes to the end of the class list on the passed node. Will not re-apply duplicate classes, except in edge cases when adding multiple classes at once.
Functiondojo.addOnLoad(obj: Object?, functionName: String|Function)
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.
registers a function to be triggered when window.onunload fires. Be careful trying to modify the DOM or access JavaScript properties during this phase of page unloading: they may not always be available. Consider dojo.addOnUnload() if you need to modify the DOM or do heavy JavaScript work.
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.
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
Functiondojo.byId(id: String|DOMNode, doc: Document): assume it's a node | DomNode
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.
Functiondojo.clone(o: anything): Array | Node | Date | Object
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|null, event: String, context: Object|null, method: String|Function, dontFix: Boolean)
Create a link that calls one function when another executes.
Functiondojo.connectPublisher(topic: String, obj: Object|null, event: String): Handle
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.coords(node: DomNode|String, includeScroll: Boolean?)
Returns an object that measures margin box width/height and absolute positioning data from dojo._abs().
Functiondojo.create(tag: String|DomNode, attrs: Object, refNode: String|DomNode?, pos: String?): DomNode
Create an element, allowing for optional attribute decoration and placement.
Functiondojo.delegate(obj: The, props: an)
Returns a new object which "looks" to obj for properties which it does not have a value for. Optionally takes a bag of properties to seed the returned object with initially.
Functiondojo.deprecated(behaviour: String, extra: String?, removal: String?)
Log a debug message to indicate that a behavior has been deprecated.
Removes a node from its parent, clobbering it and all of its children.
Functiondojo.disconnect(handle: Handle)
Remove a link created by dojo.connect.
safely removes all children of the node.
Functiondojo.eval(scriptFragment: String): Object
Perform an evaluation in the global scope. Use this rather than calling 'eval()' directly.
Functiondojo.every(arr: Array|String, callback: Function|String, thisObject: Object?): Boolean
Determines whether or not every item in arr satisfies the condition implemented by callback.
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...): Object
Adds all properties and methods of props to constructor's prototype, making them available to all instances created with constructor.
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?): Array
Returns a new Array with those items from arr that match the condition implemented by callback.
Functiondojo.fixEvent(evt: Event, 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?): String
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. Throws for invalid JSON strings.
Functiondojo.getComputedStyle(node: DOMNode): CSS2Properties
Returns a "computed style" object.
Functiondojo.getObject(name: String, create: Boolean?, context: Object?): 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.
Returns whether or not the specified classes are a portion of the class list currently applied to the node.
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?): Number
locates the first index of the provided value in the passed array. If the value is not found, -1 is returned.
Functiondojo.isAlien(it: anything): Boolean
Returns true if it is a built-in function or some other kind of oddball that *should* report as a function but doesn't
Functiondojo.isArray(it: anything): Boolean
Return true if it is an Array
Functiondojo.isArrayLike(it: anything): Boolean
similar to dojo.isArray() but more permissive
Returns true if node is a descendant of ancestor
Functiondojo.isFunction(it: anything): Boolean
Return true if it is a Function
Functiondojo.isObject(it: anything)
Returns true if it is a JavaScript object (or an Array, a Function or null)
Functiondojo.isString(it: anything): Boolean
Return true if it is a String
Functiondojo.lastIndexOf(array: Array, value: Object, fromIndex: Integer?): Number
locates the last index of the provided value in the passed array. If the value is not found, -1 is returned.
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.
Functiondojo.map(arr: Array|String, callback: Function|String, thisObject: Function?): Array
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...): 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.
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?): DomNode
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
If the context stack contains elements, ensure that subsequent code executes in the *previous* context to the current context. The current context set ([global, document]) is returned.
Functiondojo.provide(resourceName: String): Object
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.pushContext(g: Object|String?, d: MDocumentElement?): Array
causes subsequent calls to Dojo methods to assume the passed object and, optionally, document as the default scopes to use. A 2-element array of the previous global and document are returned.
Functiondojo.query(query: String, root: String|DOMNode?, listCtor: Function?): dojo.NodeList
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.
returns an object representing a de-serialized query section of a URL. Query keys with multiple values are returned in an array.
maps a module name to a path
Removes an attribute from an HTML element.
Removes the specified classes from node. No dojo.hasClass check is required.
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?)
loads a bundle intelligently based on whether the module is local or xd. Overrides the local-case implementation.
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?): 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?): Boolean
Determines whether or not any item in arr satisfies the condition implemented by callback.
Functiondojo.stopEvent(evt: Event)
prevents propagation and clobbers the default action of the passed event
Functiondojo.style(node: DomNode|String, style: String|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.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?): null | String
Returns a [JSON](http://json.org) serialization of an object.
Trims whitespace from both sides of the string
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.
Functiondojo.withDoc(documentObject: DocumentElement, callback: Function, thisObject: Object?, cbArguments: Array?)
Invoke callback with documentObject as dojo.doc.
Functiondojo.withGlobal(globalObject: Object, callback: Function, thisObject: Object?, cbArguments: Array?)
Invoke callback with globalObject as dojo.global and globalObject.document as dojo.doc.
Functiondojo.xdRequireLocalization(m, b, locale: String?, fLocales, moduleName: String, bundleName: String, availableFlatLocales: String)
Internal xd loader function. The xd version of dojo.requireLocalization.
Functiondojo.xhr(method: String, args: dojo.__XhrArgs, hasBody: Boolean?): dojo.Deferred
Sends an HTTP request with the given method.
Sends an HTTP DELETE request to the server.
Sends an HTTP GET request to the server.
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. Send raw data 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. Send raw data in the body of the PUT request.
Functiondojo._abs(node: DomNode, includeScroll: Boolean?): Object
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.
Functiondojo._connect(obj, event, context, method, dontFix): Handle
The default easing function for dojo._Animation(s)
Existing alias for dojo.destroy. Deprecated, will be removed in 2.0
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?): Boolean
Returns an animation that will fade the node defined by args.node from the start to end values passed (args.start args.end) (end is mandatory, start is optional)
Functiondojo._filterQueryResult(nodeList, simpleFilter)
Functiondojo._getBorderBox(node, computedStyle)
returns an object with properties useful for noting the border dimensions. * l/t = the sum of left/top border (respectively) * w = the sum of the left and right border * h = the sum of the top and bottom border 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._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.
Functiondojo._getMarginBox(node: DomNode, computedStyle: Object)
returns an object that encodes the width, height, left and top positions of the node's margin box.
Functiondojo._getMarginExtents(n, computedStyle)
returns object with properties useful for box fitting with regards to box margins (i.e., the outer-box). * l/t = marginLeft, marginTop, respectively * w = total width, margin inclusive * h = total height, margin inclusive 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.
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.
Returns object with properties useful for box fitting with regards to padding. * l/t = the sum of left/top padding and left/top border (respectively) * w = the sum of the left and right padding and border * h = the sum of the top and bottom padding and border 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._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): mixed
Functiondojo._getText(uri: URI, fail_ok: Boolean): null | String
Read the contents of the specified uri and return those contents.
Functiondojo._hitchArgs(scope, method: ,...): mixed
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: Deferred, validCheck: Function, ioCheck: Function, resHandle: Function)
watches the io request represented by dfd to see if it completes.
True if the node is BUTTON or INPUT.type="button".
Functiondojo._loadPath(relpath: String, module: String?, cb: Function?): Boolean
Internal xd loader function. Overrides loadPath() from loader.js. xd loading requires slightly different behavior from loadPath().
calls loadUri then findModule and returns true if both succeed
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._onto(arr, obj, fn)
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.
set the opacity of the passed node portably. Returns the new opacity of the node.
Functiondojo._toDom(frag: String, doc: DocumentNode?): DOMNode
instantiates an HTML fragment returning the corresponding DOM.
Functiondojo._toPixelValue(element, value, avalue)
True if the node uses border-box layout.
Functiondojo._xdCreateResource(contents: String, resourceName: String, resourcePath: String): 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.
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.
Functiondojo._xhrObj(): XMLHTTPRequest instance
does the work of portably generating a new XMLHTTPRequest object.

Jump to FunctionsJump to ConstructorsJump to NamespacesPropertiesBack to top