5

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);

CloudyMarble
  • 36,908
  • 70
  • 97
  • 130
fengtianxp
  • 51
  • 2

1 Answers1

3

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

Craig Swing
  • 8,152
  • 2
  • 30
  • 43
  • so it means it is impossible to use requirejs with dojo1.8 now? We had to wait the dojo1.9 release? – fengtianxp Feb 06 '13 at 02:37
  • Yes the ticket is currently scheduled for 1.9. What are you trying to use RequireJS for? What is it about Dojo's implementation of an AMD loader that does not work for you? – Craig Swing Feb 06 '13 at 13:00
  • I want to using gcli https://github.com/mozilla/gcli, in a dojo based application. If I use dojo to load gcli, it will fail since the different loader. So maybe I can only use requirejs to load dojo. Maybe it is still not work. – fengtianxp Feb 06 '13 at 14:46
  • 1
    @CraigSwing I'm using dojo 1.10, I'm still getting the same error – Hubro Feb 05 '15 at 08:51