Opened 14 years ago

Closed 13 years ago

#435 closed enhancement (invalid)

How can i download the whole dojo.js on demand?

Reported by: anonymous Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.2
Keywords: Cc:
Blocked By: Blocking:

Description

I am trying webwork 2.2 for ajax, and i found some performance downside when loading the dojo.js . for better user usability ,I think the index page would be load and show much more rapidly , due to the ajax pattern of ON-Demand javascript loading ,I think it may be better that dojo can provide a way to loading the whole dojo.js Asynchronously after the loading of index page . But when i have refactored my trival web app , and i found that when i load dojo.js using window.onload , there was some errors happend ,the error line is:

dojo.storage.setProvider(new dojo.storage.browser.StorageProvider?()); dojo.storage.provider.writeStorage();---this lead to the index page refresh to blank page and download something

(error here ,error msg says"dojo undefined" )

dojo.addOnLoad(function(){

dojo.storage.provider.flash = (dojo.render.html.ie) ? windowdojoStorage? : documentdojoStorage?;

});

Change History (1)

comment:1 Changed 13 years ago by Tom Trenka

Resolution: invalid
Status: newclosed

You shouldn't load dojo.js onload; it's intended to be included as a straight up script tag, and use dojo.require to include the code you need.

Note: See TracTickets for help on using tickets.