Dojo API CheatSheet
Top
Key Constants
(61)
djConfig
(5)
Advanced Scope
(5)
Miscellaneous
(6)
Objects OO
(11)
Language Helpers
(11)
Document Lifecycle
(4)
Package System
(8)
Sniffing
(9)
DOM Manipulation
(14)
Arrays
(19)
Event System
(11)
JSON
(9)
Colors
(6)
DOM Attributes
(14)
Styles CSS
(11)
Ajax
(8)
Effects
(13)
NodeList Events
(17)
var
d = dojo,
$ = d.query,
dk = d.keys
Key Constants
(dojo.keys.*)
BACKSPACE
TAB
CLEAR
ENTER
SHIFT
CTRL
ALT
META
PAUSE
CAPS_LOCK
ESCAPE
SPACE
PAGE_UP
PAGE_DOWN
END
HOME
LEFT_ARROW
UP_ARROW
RIGHT_ARROW
DOWN_ARROW
INSERT
DELETE
HELP
LEFT_WINDOW
RIGHT_WINDOW
SELECT
NUMPAD_0
NUMPAD_1
NUMPAD_2
NUMPAD_3
NUMPAD_4
NUMPAD_5
NUMPAD_6
NUMPAD_7
NUMPAD_8
NUMPAD_9
NUMPAD_MULTIPLY
NUMPAD_PLUS
NUMPAD_ENTER
NUMPAD_MINUS
NUMPAD_PERIOD
NUMPAD_DIVIDE
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
NUM_LOCK
SCROLL_LOCK
copyKey
djConfig
djConfig.parseOnLoad
djConfig.requires
djConfig.isDebug
djConfig.debugAtAllCosts
djConfig.baseUrl
Advanced Scope
d.global
d.doc
d.setContext
(globalObject, globalDocument)
d.withGlobal
(globalObject, callback, thisObject, cbArguments)
d.withDoc
(documentObject, callback, thisObject, cbArguments)
Miscellaneous
d.config
d.locale
d.version
d.experimental
()
d.deprecated
()
d.baseUrl
Objects OO
d.mixin
(obj, props)
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.safeMixin
safeMixin(target, source)
$('.nodes').instantiate
(declaredClass, properties)
Language Helpers
d.eval
(scriptFragment)
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.addOnLoad
(obj, functionName)
d.ready
(obj, functionName)
d.addOnWindowUnload
(obj, functionName)
d.addOnUnload
(obj, functionName)
Package System
d.require
(moduleName, omitModuleCheck)
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.isBrowser
d.isKhtml
d.isWebKit
d.isChrome
d.isMac
d.isMoz
d.isMozilla
d.isFF
d.isQuirks
DOM Manipulation
d.clone
(o)
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.indexOf
(array, value, fromIndex, findLast)
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.connect
(obj, event, context, method, dontFix)
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.fromJson
(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
new
d.Color
(color)
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.isDescendant
(node, ancestor)
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.boxModel
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.contentHandlers
d.xhr
(method, args, hasBody)
d.xhrGet
(args)
d.xhrPost
(args)
d.rawXhrPost
(args)
d.xhrPut
(args)
d.rawXhrPut
(args)
d.xhrDelete
(args)
Effects
new
d.Animation
(args)
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').onblur
(a, b)
$('.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