Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using dojo 1.8 with requirejs

Tags:

requirejs

dojo

Does anyone has the experience integrate dojo 1.8 with requrejs? If I use requrejs to load dojo/dijit/dojox it will throw some exceptions about has.js not work correctly.

TypeError: _3.add is not a function
_3.add("dom-addeventlistener",!!document.addEventListener);

like image 470
fengtianxp Avatar asked Oct 21 '22 18:10

fengtianxp


1 Answers

from

http://requirejs.org/docs/dojo.html

As of Dojo 1.8, Dojo has converted their modules to AMD modules. However, Dojo uses some loader plugins, and the loader plugin APIs are still in draft mode for AMD. So while some modules from Dojo can be used with RequireJS, it will be difficult to use all of Dojo. It is best to use Dojo's AMD loader until ticket 15616 has been resolved.

http://bugs.dojotoolkit.org/ticket/15616

like image 162
Craig Swing Avatar answered Oct 25 '22 18:10

Craig Swing