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
?
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...
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With