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

Go To StackoverFlow.com

12

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?

2012-04-04 06:49
by Vijin Paulraj


7

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...

2012-04-04 06:54
by Gatekeeper


3

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

2013-10-29 18:38
by John McCann
I believe putting all properties into data-dojo-props was in release 1.6 only. It had a large community backlash and was dropped in 1.7. See linkM P 2014-09-22 02:05
Ads