Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#14394 closed defect (fixed)

cdn xdomain build seems to not expose modules as globals

Reported by: ben hockey Owned by: Rawld Gill
Priority: blocker Milestone: 1.7.1
Component: Loader Version: 1.7.0
Keywords: Cc:
Blocked By: Blocking:


using dojo from cdn, xdomain, it seems that dojo.require('dojo.fx'); does not expose the dojo.fx global. i'm not sure if this is specifically related to dojo.fx since i saw the same issue with

in the attached test case, after it loads, in the console, you'll see that dojo.fx is undefined. if you call dojo.require('dojo.fx') from the console again then dojo.fx will be defined.

Uncaught TypeError: Cannot call method 'slideTo' of undefined
> dojo.fx
> dojo.require('dojo.fx')
> dojo.fx

Attachments (1)

14394.html (497 bytes) - added by ben hockey 9 years ago.

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by ben hockey

Attachment: 14394.html added

comment:1 Changed 9 years ago by ben hockey

Component: GeneralLoader
Owner: set to Rawld Gill
Priority: normalhighest
severity: normalcritical

comment:2 Changed 9 years ago by Kenneth G. Franqueiro

Milestone: 1.7.1

comment:3 Changed 9 years ago by Rawld Gill

When a dojo.require'd module is loaded async via legacy xdomain the code that publishes the module value iff has("config-publishRequireResult") is missed. This can be fixed by added a dojo.ready function to re-accomplish this task

comment:4 Changed 9 years ago by Rawld Gill

Resolution: fixed
Status: newclosed

In [27274]:

reaccomplish config-publishRequireResult process if module is loaded async due to xd; fixes #14394; !strict

comment:5 Changed 9 years ago by Adam Peller

Resolution: fixed
Status: closedreopened

need to push change to 1.7 branch

comment:6 Changed 9 years ago by Rawld Gill

In [27284]:

improved fix for #14394 to address the real problem; refs #14394; !strict

comment:7 Changed 9 years ago by Rawld Gill

Resolution: fixed
Status: reopenedclosed

In [27297]:

backport [27284]; fixes #14394; !strict

comment:8 Changed 9 years ago by gaxweb

I'm still having this problem with 1.7.1 so I still have to wrap all my code in a dojo.ready function as mentioned by rcgill for it to work. Just putting it into a script element in front of the closing body tag is not enough.

comment:9 Changed 9 years ago by ben hockey


i suspect you're having a different issue. its always been the case that you should wrap your code in a dojo.ready function when loading xdomain. perhaps everything is actually working as expected in your case.

anyhow, since this ticket is closed, if you think you have an issue then go ahead and open a new ticket and attach a test case. be sure to attach a test case because we will need it to reproduce your problem.

Note: See TracTickets for help on using tickets.