Dojo - XHTML validation?

Is it possible to make Dojo widgets (javascript) validated for XHTML?

If so, how?

Maybe it's as simple as using CDATA?

+1
javascript dojo
source share
2 answers

Yes, instead of using the non-standard attribute dojoType = "dojo.foo.bar" instead, you need to have an onload document event that "accepts" the standard HTML tags in your document and overwrites them in Dojo.

+1
source share

CDATA won't help you. If you really want to write code in accordance with the XHTML DTD / schema, you can do this, but you cannot take advantage of the flexibility of the Dojo markup language (DojoML). What you can do is that you define your own way of labeling widgets, for example <div class="dojoButton"/> , and then you create them on the page load using something like:

 dojo.query('div[class=dojoButton]').instantiate( dijit.form.Button, {} ); 

Before you do this, check out this paragraph Dojo Does Not Check (in the middle of the article), and this is Dojo Degradability .

+1
source share

All Articles