Details |
Last modification |
View Log
| RSS feed
| Rev |
Author |
Line No. |
Line |
| 2150 |
mathias |
1 |
if(!dojo._hasResource["foo.bar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
|
|
|
2 |
dojo._hasResource["foo.bar"] = true;
|
|
|
3 |
dojo.provide("foo.bar");
|
|
|
4 |
|
|
|
5 |
//Define some globals and see if we can read them.
|
|
|
6 |
|
|
|
7 |
//This is OK
|
|
|
8 |
barMessage = "It Worked";
|
|
|
9 |
|
|
|
10 |
//This one FAILS in IE/Safari 2 with regular eval.
|
|
|
11 |
function getBarMessage(){
|
|
|
12 |
return barMessage;
|
|
|
13 |
}
|
|
|
14 |
|
|
|
15 |
//This is OK
|
|
|
16 |
getBar2Message = function(){
|
|
|
17 |
return getBarMessage();
|
|
|
18 |
}
|
|
|
19 |
|
|
|
20 |
}
|