Dojo API CheatSheet
var
  • d = dojo,
  • $ = d.query,
  • dk = d.keys
Key Constants
djConfig
Advanced Scope
  • d.doc
  • d.setContext(globalObject, globalDocument)
  • d.withGlobal(globalObject, callback, thisObject, cbArguments)
  • d.withDoc(documentObject, callback, thisObject, cbArguments)
  • Miscellaneous
  • d.locale
  • d.version
  • d.experimental()
  • d.deprecated()
  • d.baseUrl
  • Objects OO
  • d.setObject(name, value, context)
  • d.getObject(name, create, context)
  • d.exists(name, obj)
  • d.extend(constructor, props)
  • d.hitch(scope, method)
  • d.delegate(obj, props)
  • d.partial(method)
  • d.declare(className, superclass, props)
  • d.safeMixinsafeMixin(target, source)
  • $('.nodes').instantiate(declaredClass, properties)
  • Language Helpers
  • d.isString(it)
  • d.isArray(it)
  • d.isFunction(it)
  • d.isObject(it)
  • d.isArrayLike(it)
  • d.isAlien(it)
  • d._toArray(obj, offset, startWith)
  • d.trim(str)
  • d.replace(tmpl, map, pattern)
  • new d.Deferred(canceller)
  • Document Lifecycle
  • d.ready(obj, functionName)
  • d.addOnWindowUnload(obj, functionName)
  • d.addOnUnload(obj, functionName)
  • Package System
  • d.provide(resourceName)
  • d.platformRequire(modMap)
  • d.requireIf(condition, resourceName)
  • d.requireAfterIf(condition, resourceName)
  • d.registerModulePath(module, prefix)
  • d.requireLocalization(moduleName, bundleName, locale, availableFlatLocales)
  • d.moduleUrl(module, url)
  • Sniffing
  • d.isKhtml
  • d.isWebKit
  • d.isChrome
  • d.isMac
  • d.isMoz
  • d.isMozilla
  • d.isFF
  • d.isQuirks
  • DOM Manipulation
  • d.body()
  • d.byId(id, doc)
  • d.destroy(node)
  • d.place(node, refNode, position)
  • d.create(tag, attrs, refNode, pos)
  • d.empty(node)
  • d.query(query, root)
  • $('.nodes').empty()
  • $('.nodes').place(queryOrNode, position)
  • $('.nodes').orphan(simpleFilter)
  • $('.nodes').adopt(queryOrListOrNode, position)
  • $('.nodes').query(queryStr)
  • $('.nodes').addContent(content, position)
  • Arrays
  • d.lastIndexOf(array, value, fromIndex)
  • d.forEach(arr, callback, thisObject)
  • d.every(arr, callback, thisObject)
  • d.some(arr, callback, thisObject)
  • d.map(arr, callback, thisObject)
  • d.filter(arr, callback, thisObject)
  • $('.nodes').slice()
  • $('.nodes').splice()
  • $('.nodes').indexOf()
  • $('.nodes').lastIndexOf()
  • $('.nodes').every()
  • $('.nodes').some()
  • $('.nodes').end()
  • $('.nodes').concat(item)
  • $('.nodes').map(func, obj)
  • $('.nodes').forEach(callback, thisObj)
  • $('.nodes').filter(simpleFilter)
  • $('.nodes').at()
  • Event System
  • d.disconnect(handle)
  • d.subscribe(topic, context, method)
  • d.unsubscribe(handle)
  • d.publish(topic, args)
  • d.connectPublisher(topic, obj, event)
  • d.fixEvent(evt, sender)
  • d.stopEvent(evt)
  • d.isCopyKey(e)
  • d.mouseButtons
  • $('.nodes').connect()
  • JSON
  • d.toJsonIndentStr
  • d.toJson(it, prettyPrint, _indentStr)
  • d.fieldToObject(inputNode)
  • d.formToObject(formNode)
  • d.objectToQuery(map)
  • d.formToQuery(formNode)
  • d.formToJson(formNode, prettyPrint)
  • d.queryToObject(str)
  • Colors
  • d.blendColors(start, end, weight, obj)
  • d.colorFromRgb(color, obj)
  • d.colorFromHex(color, obj)
  • d.colorFromArray(a, obj)
  • d.colorFromString(str, obj)
  • DOM Attributes
  • d.setSelectable(node, selectable)
  • d.marginBox(node, box)
  • d.contentBox(node, box)
  • d.position(node, includeScroll)
  • d.coords(node, includeScroll)
  • d.hasAttr(node, name)
  • d.attr(node, name, value)
  • d.removeAttr(node, name)
  • d.getNodeProp(node, name)
  • $('.nodes').attr()
  • $('.nodes').removeAttr()
  • $('.nodes').coords()
  • $('.nodes').position()
  • Styles CSS
  • d.getComputedStyle(node)
  • d.style(node, style, value)
  • d.hasClass(node, classStr)
  • d.addClass(node, classStr)
  • d.removeClass(node, classStr)
  • d.toggleClass(node, classStr, condition)
  • $('.nodes').style()
  • $('.nodes').addClass()
  • $('.nodes').removeClass()
  • $('.nodes').toggleClass()
  • Ajax
  • d.xhr(method, args, hasBody)
  • d.xhrGet(args)
  • d.xhrPost(args)
  • d.rawXhrPost(args)
  • d.xhrPut(args)
  • d.rawXhrPut(args)
  • d.xhrDelete(args)
  • Effects
  • d.fadeIn(args)
  • d.fadeOut(args)
  • d.animateProperty(args)
  • d.anim(node, properties, duration, easing, onEnd, delay)
  • anim.duration
  • anim.repeat
  • anim.rate
  • anim.play(delay, gotoStart)
  • anim.pause()
  • anim.gotoPercent(percent, andPlay)
  • anim.stop(gotoEnd)
  • anim.status()
  • NodeList Events
  • $('.nodes').onfocus(a, b)
  • $('.nodes').onchange(a, b)
  • $('.nodes').onclick(a, b)
  • $('.nodes').onerror(a, b)
  • $('.nodes').onkeydown(a, b)
  • $('.nodes').onkeypress(a, b)
  • $('.nodes').onkeyup(a, b)
  • $('.nodes').onload(a, b)
  • $('.nodes').onmousedown(a, b)
  • $('.nodes').onmouseenter(a, b)
  • $('.nodes').onmouseleave(a, b)
  • $('.nodes').onmousemove(a, b)
  • $('.nodes').onmouseout(a, b)
  • $('.nodes').onmouseover(a, b)
  • $('.nodes').onmouseup(a, b)
  • $('.nodes').onsubmit(a, b)
  • Dojo 1.4.0 (20973) Docs generated 2009-12-07