Plugd – Dojo: the missing APIs

Just today, while reading about the release of the Dojo Toolkit 1.3 beta, I learned about the plugd addition to Dojo Toolkit. The author of plugd describes it this way.

The API’s found in plugd are loosely based on “my favorite bits of jQuery” … this is not meant to be a ‘compatibility shim’ of any kind, it is simply the addition of functions and helpers to Dojo Base. Added magic.

plugd adds several convenience functions, all located in the dojo namespace. For instance, by loading base.js into a page, the following new Dojo API’s are made available:

* dojo.show(), dojo.hide(), dojo.toggle()
* dojo.conflict()
* dojo.wrap()
* dojo.create()

And the following methods are added to dojo.NodeList (what you get back from calling dojo.query() (or $() after running dojo.conflict()):

* .wrap()
* .show(), .hide(), .toggle()
* .val()
* .append()
* .appendTo()
* .create()
* .animate()
* .destroy()
* .hover()
* .end() (and stash() for private use)

by Claus Witt

March 9, 2009  Tags: , ,   Posted in: Development, Web development