Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2888 closed defect (duplicate)

addOnLoad problem with cross-domain

Reported by: guest Owned by: alex
Priority: high Milestone:
Component: Loader Version: 0.4
Keywords: xd Cc: [email protected]…, James Burke
Blocked By: Blocking:


An issue has come up with addOnLoad with respect to cross-domain. I've attached a simplified test case.

To reproduce:

  • Load a XD build of dojo
  • Put a dojo.require line in a <script> tag
  • Call dojo.addOnLoad(F) line
  • After the JS file you require'd has been loaded, F() is called. This happens before the page has finished loading.

Expected behaviour:

  • addOnLoad is called for the first time once the DOM has fully loaded (eg. window.onload)

If you remove the dojo.require() it works ok.

Platforms tested:

  • FF1.5.0.9/XP: reproduced
  • FF2.0.0.3/XP: reproduced
  • FF2.0.0.3/Linux: reproduced
  • Opera9.2/XP: reproduced
  • IE7/XP: works

Attachments (1)

xd_onload.html (3.0 KB) - added by guest 15 years ago.

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by guest

Attachment: xd_onload.html added


comment:1 Changed 15 years ago by guest

The testcase is against 0.4.2rc2, but it is the same for me against 0.4 from sometime recent like [8055]

comment:2 Changed 15 years ago by James Burke

Milestone: 0.4.3
Resolution: duplicate
Status: newclosed

I think this has been fixed with r8177. I have a new file up on the AOL CDN that has this change (only the hostenv_browser/xd loader changes, no other 0.4 branch changes):

When I change the test page to use this URL, it seems OK. I was going to announce an updated xd loader, but there is still one other xd issue I'm fixing with loading local i18n bundles in a local module with debugAtAllCosts set to true.

Closing as a duplicate of #2771, but this ticket actually has a good test case.

comment:3 Changed 15 years ago by (none)

Milestone: 0.4.3

Milestone 0.4.3 deleted

Note: See TracTickets for help on using tickets.