Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
define(["dojo"], function(dojo){
return function(node, command, args){
// summary: a magic function
// example:
// magic("foo", "byId");
// example:
// magic(widget, "connect", "onClick", function(e){ })
// example:
// magic("bar", "style", { color: "red" });
// example:
// magic(".nodes", "query").forEach(function(n){ ... })
// example:
// magic([1,2,3], "forEach", function(item, idx, list){ ... });
return dojo[command].apply(dojo, dojo._toArray(arguments, 2, [node])); // Anything
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.