Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between data-dojo-type and dojotype?

Tags:

dojo

There are two kind of type declaration mentioned in dojo documentation. They are data-dojo-type and dojotype.

For example,

dojoType="dojox.grid.DataGrid"

data-dojo-type="dojox.grid.DataGrid"

Both are working fine in all major browser.But i don't understand, What is the difference between data-dojo-type and dojotype?

Where should i use dojoType? and where should i use data-dojo-type?

like image 507
Vijin Paulraj Avatar asked Apr 04 '12 06:04

Vijin Paulraj


2 Answers

I think its a new syntax of the same thing, maybe its functionality is slightly different as it is adjusted for html5, you can read more here. Anyway from what i saw its recommended to use data-dojo-type...

like image 109
Gatekeeper Avatar answered Nov 05 '22 02:11

Gatekeeper


From dojo 1.6 documentation:

The dojoType attribute has been deprecated, and will be unsupported in 2.0. Replace all occurrences of dojoType with data-dojo-type, as the behavior is mostly identical, with the following caveats:

when using data-dojo-type, all widget properties must be stashed on a single attribute: data-dojo-props

See http://dojotoolkit.org/reference-guide/1.9/releasenotes/1.6.html

like image 3
John McCann Avatar answered Nov 05 '22 03:11

John McCann