javascript - what is the use of data-dojo-config in Dojo -
i started learning dojo , came across how include dojo using cdn below code defined in dojo tutorial
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js"             data-dojo-config="async: true"> here why have missed http? intentional, program not working unless add http in code.
also use of data-dojo-config attribute, don't see difference in basic program if remove attribute. when need use attribute?
when access other examples, see differently:
data-dojo-config="isdebug: 1, async: 1, parseonload: 1" what these properties, when use them?
he data-dojo-config configurations paramenter the dojo loader , parser. similar configurations parameters set loading database server instance.
what dojo loader , parser?
dojo loader: loads javascript modules ( javascript files ) synchronously or asynchronously.
dojo parser: function of dojo parser parse , convert html code dojo widgets wherever necessary.
the data-dojo-config can set @ start of dojo application.
they cannot changed during run time.
if not set take default values.
 can set 1 (or true) or 0 (or false)
isdebug - sets debug level dojo application. 
 async - (default 1) whether dojo javascript modules should loaded synchronously or asynchronously.
 parseonload - when set true dojo parser automatically parses html document , converts data-dojo-elements dojo widgets. if set false need explicitly call dojo parser parse html document.
Comments
Post a Comment