[Dojo-interest] Examples Using Dijit with Zero Markup?

Peter E Higgins dante at dojotoolkit.org
Mon Apr 28 12:30:27 UTC 2008

It's very possibly.  All widgets are designed so that they can be 
parsed, and all their attributes stolen from the node, or 
programatically. There are isolated examples for most every widget, 
though no "single" markup-free example I am aware of.

An example of "progressive enhancement" would be (off the top of my 
head) the SitePen QuickStart they've just put out:

It's a ton of valid html, and a script (uncompressed for learning) 
tab.js - which turns the whole thing into a Stack Container and adds 
some syncage to the navigation.

The "magic" of Full layout UI from plain JSON definitions is something 
that dijit does not do, though with some effort a wrapper to provide 
such functionality could be developed. All the potential is there, just 
not implemented. The most dificult part would be supplementing the small 
ammount of Dom Manipulation needed to work with layout and non-layout 
widgets together, though dijit provides access to both:

var othernode = dijit.byId("myContentPane").containerNode; // the body
var obj = dijit.byId("foo") is the object foo,
var dom = dijit.byId("foo").domNode is the place in the dom the widget 
othernode.appendChild(dom); // to place the widget in the contentPane

So it's very easy with a mixture of obj and dom.  Dojo / Dijit makes few 
assumptions like that, though provides a consistent API to accomplish it.

Hope this helps.

Peter Higgins

p.s. you are the second person to mention no-password mailling.  If you 
jump in #dojo (irc.freenode.net) sometime we can look into dtk.org 
account issues, or just reset your password ...

Philip Weaver wrote:
> I do think that being able to use Dijit using object literal notation 
> instead of markup is a big deal. I have been using ExtJS lately and 
> that project is having some license issues atm. ExtJS allows 
> developers to describe a UI fully using object literal notation. 
> Perhaps this is not fully possible if Dijit does not have a full set 
> of layout managers. Is this all possible?
> On Mon, Apr 28, 2008 at 5:08 AM, Philip Weaver <philmaker at gmail.com 
> <mailto:philmaker at gmail.com>> wrote:
>     I'm interested in using Dijit using Javascript only with no HTML
>     markup. Unfortunately, many of the examples I see are a mix of
>     HTML and Javascript. Can anyone point me to examples which are
>     illustrate using Dijit using Javascript only.
>     Also, I just tried signing up for the forums but that never works
>     - it never asks me to enter a password - never mails me a password
>     - I have checked my spam folder.
>     Thanks,
>     Philip
> ------------------------------------------------------------------------
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest at dojotoolkit.org
> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest

More information about the Dojo-interest mailing list