source: Dev/trunk/src/client/dojo/tests/_base/loader/8976.html

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 1.2 KB
Line 
1<html>
2<head>
3        <script type="text/javascript" src="../../../dojo.js"
4                djConfig="parseOnLoad: false, isDebug: true"></script>
5</head>
6<body>
7<h1>Testcase for #8976</h1>
8<p>Test case for <a href="http://bugs.dojotoolkit.org/ticket/8976">#8976</a>, an async load issue with Firefox even
9    though the loading should be synchronous. Click the button then check console log for output of test. If "count = 1, worked"
10    shows up instead of an error, then the test is successful.
11</p>
12
13<script>
14var count = 0;
15function wait(count){
16        console.log("count = "+count+", calling addOnLoad");
17        dojo.addOnLoad(function(){
18                try{
19                        console.log("count = "+count+", testing");
20                        var i = dijit.layout.TabController.constructor;
21                        console.log("count = "+count+", worked");
22                }catch(e){ alert("failed: " + e) }
23        });
24        console.log("count = "+count+", addOnLoad returned");
25}
26function load(count){
27        console.log("count = "+count+", calling require");
28        dojo.require("dijit.dijit");
29        dojo.require("dijit.dijit-all");
30        console.log("count = "+count+", require returned");
31}
32</script>
33<input type=button onmousedown="load(count++);return true" onmouseup="wait(count++);return true" value="click this button to load and wait">
34</body>
35</html>
Note: See TracBrowser for help on using the repository browser.