Dojo Lazy Loading

Dojo 7 May 2007 2 Comments



dojo.require("dojo.event.*");
dojo.require("dojo.io.*");

are lazy. Be more specific:

dojo.require("dojo.event.connect");
dojo.require("dojo.io.bind");

Always load dojo package with a specific target.



  • http://alex.dojotoolkit.org Alex Russell

    Hey,

    Good news, the “.*” syntax is going away in 0.9 (at least in Core). Should help ensure that require()’s can’t as easily shoot you in the foot.

  • http://www.sumardi.net SMD

    Hi Alex,

    Thank you for pointing me to this. Sure, that’s a good news in dojo 0.9. I will give it a try.

    Regards.