Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#8732 closed defect (fixed)

dojo.io.script should use script onload callbacks

Reported by: James Burke Owned by: James Burke
Priority: high Milestone: 1.4
Component: Core Version: 1.3.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

Script onload callbacks seem reliable now across our supported browsers, use them in dojo.io.script.

Change History (6)

comment:2 Changed 11 years ago by James Burke

Resolution: fixed
Status: newclosed

Fixed in [17445]: "adds script onload detection. Most of the core trick taken from plugd, from phiggins. Also allows jsonp instead of awkward callbackParamName for setting jsonp callback name. \!strict for some bizarre no side effect warning."

comment:3 Changed 10 years ago by bill

Resolution: fixed
Status: closedreopened

After the above change tests.io.script is failing on IE6 when run from dojo/tests/runTests.html. It runs correctly stand-alone.

comment:4 Changed 10 years ago by James Burke

Resolution: fixed
Status: reopenedclosed

Hmm, maybe a timeout with DOH for an for some reason? I just ran the full tests via util/doh/runner.html (no testModule param) and the io.script tests pass as part of the full test suite. I also triggered it via dojo/tests/runTests.html with the same successful result.

comment:5 Changed 10 years ago by bill

Hmm, I get:

GROUP "t" has 4 tests to run [object Error]     ERROR IN:  function ioScriptLoad(t){ //t.is("undefined", typeof(scriptLoad)); var d = new doh.Deferred(); var td = dojo.io.script.get({ url: "scriptLoad.js" }); td.addBoth(function(res){ if(typeof(scriptLoad) != "undefined" && t.is("loaded", scriptLoad)){ d.callback(true); }else{ d.errback(false); } }); return d; } FAILED test: ../../dojo/tests/io/script.html::t::ioScriptLoad 0 ms

Actually it's failing for me standalone too. On IE6/parallels, IE7/parallels, and IE8 on a real windows machine.

Are you running over http? Does http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/tests/io/script.html work for you? (it fails for me)

comment:6 Changed 10 years ago by James Burke

(In [20709]) Fixes #8732. It would help if I actually check in test files.

Note: See TracTickets for help on using tickets.