Opened 10 years ago

Closed 9 years ago

#9663 closed defect (wontfix)

featureDetection: Loader changes

Reported by: James Burke Owned by: dylan
Priority: high Milestone: future
Component: Core Version: 1.3.2
Keywords: Cc: Eugene Lazutkin
Blocked By: Blocking:

Description

A ticket to go through the loader changes in the featureDetection branch and bring them in to the trunk.

From my initial reading of the code, I have some questions:

1) document.write() is used to load module files (before page load fires). This is similar to what the trunk's source version of dojo.js does, but expanded to all modules. This is a nice optimization, but it seems to break nested dojo.require calls? So, if file A.js has a dojo.require("B") in it, B.js will actually load after A.js. This will break things in A if it does something like a dojo.declare("A", [B]), where A is referencing B as part of A.js's loading.

What are your thoughts on that problem? The loader's ability to load dependencies in the right order is a main feature of the loader.

2) Using document.write without a function wrapper breaks multiversion support -- Dojo allows more than one version of Dojo in a page, and it accomplishes this by loading the module content and wrapping that content in a function wrapper where it passes in the dojo, dijit, dojox and any other desired custom namespaces as arguments to that function wrapper. In this way, the module is loaded into the right version of Dojo.

What are you thoughts on multiversion support?

3) The dojo.js in the source tree now contains functions, and some of the old files like bootstrap.js has been removed. Normally what happens in a build, dojo.js is replaced by a collection of bootstrap.js, the loader.js/loader_xd.js (if xd build) and a hostenv file.

How do you see that working in the new version? My first thought would be to treat what is mostly there in the dojo.js file as bootstrap.js file and revert to the old dojo.js.

Change History (6)

comment:1 Changed 10 years ago by James Burke

Cc: davidmark added
Keywords: davidmark removed

comment:2 Changed 10 years ago by James Burke

Cc: davidmark removed
Owner: changed from James Burke to davidmark

comment:3 Changed 10 years ago by Mike Wilson

It probably doesn't apply, but in case this new document.write-oriented loading scheme starts creating both external and inline scripts, I want to remind about the IE6 ordering bugs in this area.

comment:4 Changed 10 years ago by Eugene Lazutkin

Cc: Eugene Lazutkin added

comment:5 Changed 9 years ago by Chris Mitchell

Owner: changed from davidmark to dylan

comment:6 Changed 9 years ago by bill

Resolution: wontfix
Status: newclosed

This work is superceded by the AMD loader changes for 1.6 and 1.7.

Note: See TracTickets for help on using tickets.