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

1

1 Answer 1

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

4
  • so it means it is impossible to use requirejs with dojo1.8 now? We had to wait the dojo1.9 release?
    – fengtianxp
    Feb 6, 2013 at 2: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? Feb 6, 2013 at 13:00
  • I want to using gcli 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 6, 2013 at 14:46
  • 1
    @CraigSwing I'm using dojo 1.10, I'm still getting the same error
    – Hubro
    Feb 5, 2015 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.