Login Register Help
API Documentation
Choose a stylesheet:

dojo

dojo.require("dijit._Widget");
defined in dijit/_Widget.js

 

NamespacesBack to top

dojo.cookie(name: String, value: String?, props: dojo.__cookieProps?)
Get or set a cookie.
localized formatting and parsing routines for currencies
dojo.declare(className: String, superclass: Function|Function[], props: Object)
Create a feature-rich constructor from compact notation
Utility classes to enable loading of resources for internationalization (i18n)
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 FIXME: use NaN?

ConstructorsBack to top

dojo.DeferredList(canceller: Function?)
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.

FunctionsBack to top

dojo.addClass(node: DomNode|String, classStr: String)
Adds the specified classes to the end of the class list on the passed node.
dojo.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.)
dojo.addOnUnload(obj: Object?, functionName: String|Function?)
registers a function to be triggered when the page unloads. In a browser enviroment, the functions will be triggered during the window.onbeforeunload event. Be careful doing work during window.onbeforeunload. onbeforeunload can be triggered if a link to download a file is clicked, or if the link is a javascript: link. In these cases, the onbeforeunload event fires, but the document is not actually destroyed. So be careful about doing destructive operations in a dojo.addOnUnload callback.
dojo.addOnWindowUnload(obj: Object?, functionName: String|Function?)
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.
dojo.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.
Returns an animation that will transition the properties of node defined in 'args' depending how they are defined in 'args.properties'
dojo.attr(node: DomNode|String, name: String|Object, value: String?)
Gets or sets an attribute on an HTML element.
Utility for unobtrusive/progressive event binding, DOM traversal, and manipulation.
dojo.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
dojo.byId(id, doc)
dojo.clone(o: anything)
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
dojo.colorFromHex(color: String, obj: dojo.Color?)
converts a hex string with a '#' prefix to a color object. Supports 12-bit #rgb shorthand.
dojo.colorFromRgb(color: String, obj: dojo.Color?)
get rgb(a) array from css-style color declarations
dojo.colorFromString(str: String, obj: dojo.Color?)
parses str for a color value.
dojo.connectPublisher(topic: String, obj: Object|null, 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.
dojo.contentBox(node: DomNode|String, box: Object?)
Getter/setter for the content-box of node.
dojo.coords(node: DomNode|String, includeScroll: Boolean?)
Returns an object that measures margin box width/height and absolute positioning data from dojo._abs().
dojo.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.
dojo.deprecated(behaviour: String, extra: String?, removal: String?)
Log a debug message to indicate that a behavior has been deprecated.
dojo.disconnect(handle: Handle)
Remove a link created by dojo.connect.
dojo.eval(scriptFragment: String)
Perform an evaluation in the global scope. Use this rather than calling 'eval()' directly.
dojo.every(arr: Array|String, callback: Function|String, thisObject: Object?)
Determines whether or not every item in arr satisfies the condition implemented by callback.
dojo.exists(name: String, obj: Object?)
determine if an object supports a given method
dojo.exit(exitcode)
dojo.experimental(moduleName: String, extra: String?)
Marks code as experimental.
dojo.extend(constructor: Object, props: 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.
dojo.filter(arr: Array, callback: Function|String, thisObject: Object?)
Returns a new Array with those items from arr that match the condition implemented by callback.
dojo.fixEvent(evt: Event, sender: DOMNode)
normalizes properties on the event object including event bubbling methods, keystroke normalization, and x/y positions
dojo.forEach(arr: Array|String, callback: Function|String, thisObject: Object?)
for every item in arr, callback is invoked. Return values are ignored.
dojo.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(formNode: DOMNode|String)
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.
dojo.formToQuery(formNode: DOMNode|String)
Returns a URL-encoded string representing the form passed as either a node or string ID identifying the form to serialize
dojo.fromJson(json: String)
Parses a [JSON](http://json.org) string to return a JavaScript object. Throws for invalid JSON strings.
dojo.getComputedStyle(node: DOMNode)
Returns a "computed style" object.
dojo.getObject(name: String, create: Boolean, context: Object)
Get a property from a dot-separated string, such as "A.B.C"
dojo.hasAttr(node: DomNode|String, name: String)
Returns true if the requested attribute is specified on the given element, and false otherwise.
dojo.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.
dojo.hitch(scope: Object, method: Function|String)
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.
dojo.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.
dojo.isAlien(it: anything)
Returns true if it is a built-in function or some other kind of oddball that *should* report as a function but doesn't
dojo.isArray(it: anything)
Return true if it is an Array
dojo.isArrayLike(it: anything)
similar to dojo.isArray() but more permissive
dojo.isDescendant(node: DomNode|String, ancestor: DomNode|String)
Returns true if node is a descendant of ancestor
dojo.isFunction(it: anything)
Return true if it is a Function
dojo.isObject(it: anything)
Returns true if it is a JavaScript object (or an Array, a Function or null)
dojo.isString(it: anything)
Return true if it is a String
dojo.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.
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.loadInit(init: Function)
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.
dojo.map(arr: Array|String, callback: Function|String, thisObject: Function?)
applies callback to each element of arr and returns an Array with the results
dojo.marginBox(node: DomNode|String, box: Object?)
Getter/setter for the margin-box of node.
dojo.mixin(obj: Object, props: Object...)
Adds all properties and methods of props to obj and returns the (now modified) obj.
dojo.moduleUrl(module: String, url: dojo._Url|String)
Returns a dojo._Url object relative to a module.
dojo.objectToQuery(map: Object)
takes a name/value mapping object and returns a string representing a URL-encoded version of that object.
dojo.partial(method: Function|String)
similar to hitch() except that the scope object is left to be whatever the execution context eventually becomes.
dojo.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.
dojo.platformRequire(modMap: Object)
require one or more modules based on which host environment Dojo is currently operating in
dojo.provide(resourceName: String)
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.
dojo.publish(topic: String, args: Array)
Invoke all listener method subscribed to topic.
dojo.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.
dojo.queryToObject(str: String)
returns an object representing a de-serialized query section of a URL. Query keys with multiple values are returned in an array.
dojo.registerModulePath(module: String, prefix: String)
maps a module name to a path
dojo.removeAttr(node: DomNode|String, name: String)
Removes an attribute from an HTML element.
dojo.removeClass(node: DomNode|String, classStr: String)
Removes the specified classes from node.
dojo.require(moduleName: String, omitModuleCheck: Boolean?)
loads a Javascript module from the appropriate URI
dojo.requireIf(condition: Boolean, resourceName: String)
If the condition is true then call dojo.require() for the specified resource
dojo.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.
dojo.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.
dojo.setObject(name: String, value: Object, context: Object?)
Set a property from a dot-separated string, such as "A.B.C"
dojo.setSelectable(node: DomNode|String, selectable: Boolean)
enable or disable selection on a node
dojo.some(arr: Array|String, callback: Function|String, thisObject: Object?)
Determines whether or not any item in arr satisfies the condition implemented by callback.
dojo.stopEvent(evt: Event)
prevents propagation and clobbers the default action of the passed event
dojo.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.
dojo.subscribe(topic: String, context: Object|null, 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.
dojo.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.
dojo.toJson(it: Object, prettyPrint: Boolean?, _indentStr: String?)
Returns a [JSON](http://json.org) serialization of an object.
signal fired by impending environment destruction. You may use dojo.addOnUnload() or dojo.connect() to this method to perform page/application cleanup methods. See dojo.addOnUnload for more info.
dojo.unsubscribe(handle: Handle)
Remove a topic listener.
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.
dojo.withDoc(documentObject: Object, callback: Function, thisObject: Object?, cbArguments: Array?)
Call callback with documentObject as dojo.doc. If provided, callback will be executed in the context of object thisObject
dojo.withGlobal(globalObject: Object, callback: Function, thisObject: Object?, cbArguments: Array?)
Call callback with globalObject as dojo.global and globalObject.document as dojo.doc. If provided, globalObject will be executed in the context of object thisObject
dojo.xdRequireLocalization(m, b, locale: String?, fLocales, moduleName: String, bundleName: String, availableFlatLocales: String)
Internal xd loader function. The xd version of dojo.requireLocalization.
dojo.xhr(method: String, args: dojo.__XhrArgs, hasBody: Boolean?)
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.
dojo._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.
dojo._connect(obj, event, context, method)
dojo._defaultEasing(n: Decimal?)
The default easing function for dojo._Animation(s)
dojo._destroyElement(node: String|DomNode)
removes node from its parent, clobbers it and all of its children.
dojo._disconnect(obj, event, handle, listener)
dojo._escapeString(str: String)
Adds escape sequences for non-visual characters, double quote and backslash and surrounds with double quotes to form a valid string literal.
dojo._everyOrSome(every: Boolean, arr: Array|String, callback: Function|String, thisObject: Object?)
dojo._fade(args: Object)
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)
dojo._filterQueryResult(nodeList, simpleFilter)
dojo._fireCallback(callback, context, cbArguments)
dojo._fixIeBiDiScrollLeft(scrollLeft: Integer)
dojo._getBorderBox(node, computedStyle)
dojo._getBorderExtents(n: DomNode, computedStyle: Object)
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.
dojo._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.
dojo._getMarginBox(node: DomNode, computedStyle: Object)
returns an object that encodes the width, height, left and top positions of the node's margin box.
dojo._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.
dojo._getModulePrefix(module: String)
gets the prefix associated with module
dojo._getModuleSymbols(modulename: String)
Converts a module name in dotted JS notation to an array representing the path in the source tree
dojo._getOpacity(node: DomNode)
Returns the current opacity of the passed node as a floating-point value between 0 and 1.
dojo._getPadBorderExtents(n: DomNode, computedStyle: Object)
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.
dojo._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.
dojo._getProp(parts: Array, create: Boolean, context: Object)
dojo._getText(uri: URI, fail_ok: Boolean)
Read the contents of the specified uri and return those contents.
dojo._hitchArgs(scope, method: ,...)
dojo._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).
dojo._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.
dojo._ioWatch(dfd: Deferred, validCheck: Function, ioCheck: Function, resHandle: Function)
watches the io request represented by dfd to see if it completes.
dojo._isButtonTag(node: DomNode)
True if the node is BUTTON or INPUT.type="button".
dojo._loadPath(relpath: String, module: String?, cb: Function?)
Load a Javascript module given a relative path
dojo._loadUri(uri, cb)
dojo._loadUriAndCheck(uri: String, moduleName: String, cb: Function?)
calls loadUri then findModule and returns true if both succeed
dojo._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.
dojo._moduleHasPrefix(module: String)
checks to see if module has been established
dojo._onto(arr, obj, fn)
dojo._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.
dojo._setContentSize(node: DomNode, widthPx: Number, heightPx: Number, computedStyle: Object)
Sets the size of the node's contents, irrespective of margins, padding, or borders.
dojo._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.
dojo._setOpacity(node: DOMNode, opacity: Number)
set the opacity of the passed node portably. Returns the new opacity of the node.
dojo._toPixelValue(element, value, avalue)
dojo._usesBorderBox(node: DomNode)
True if the node uses border-box layout.
Internal xd loader function. Clears the interval timer used to check on the status of in-flight xd module resource requests.
dojo._xdCreateResource(contents: String, resourceName: String, resourcePath: String)
Internal xd loader function. Creates an xd module source given an non-xd module contents.
dojo._xdEvalReqs(reqChain: Array)
Internal xd loader function. Does a depth first, breadth second search and eval of required modules.
dojo._xdExtractLoadInits(fileContents: String)
dojo._xdIsXDomainPath(relpath: String)
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.
dojo._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. Resets the xd state.
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.
Internal xd loader function. Monitors in-flight requests for xd module resources.
does the work of portably generating a new XMLHTTPRequest object.

PropertiesBack to top