Ticket #4462 (new defect)
xdomain loading of a layer file that contains dojo.gfx fails.
| Reported by: | jburke | Owned by: | jburke |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | PackageSystem | Version: | 0.9 |
| Severity: | normal | Keywords: | |
| Cc: | jayant.b.sai@… |
Description
It fails with an error that looks something like:
dojox is not defined [Break on this error] ["requireIf", dojox.gfx.renderer == "svg", "dojox.gfx.svg"].
The issue is the requireIf test expression, dojox.gfx.renderer == "svg", is being evaled before the content of dojo.gfx is run, so the expression is invalid. This is a normal xdomain behavior, but I probably need to extend the xdomain loader to:
- do a try/catch around requireIf calls.
- after all the modules are run in the right order, check to make sure there are no outstanding modules still loading before calling the onload callbacks.
With these changes, I hope the following behavior will happen:
- The xdomain loader tries to map dependencies before running the module code. When it hits a requireIf like this, it will exception out, but inside a try/catch so it is ignored.
- Then the module will be run, and then the real requireIf call can be made.
- This will put a new request on the xdomain module loading stack. Need to make sure it is totally empty before notifying the onload listeners.
Change History
Note: See
TracTickets for help on using
tickets.