Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F946898
testEval.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
964 B
Subscribers
None
testEval.html
View Options
<
html
>
<
head
>
<
script
djConfig
=
"isDebug: true"
src
=
"../../../../dojo.js"
></
script
>
<
script
>
dojo
.
registerModulePath
(
"foo"
,
"tests/_base/_loader/744/foo"
);
dojo
.
require
(
"foo.bar"
);
dojo
.
addOnLoad
(
function
(){
console
.
debug
(
barMessage
);
console
.
debug
(
getBar2Message
());
console
.
debug
(
getBarMessage
());
});
dojo
.
addOnLoad
(
function
(){
//This fails if window.execScripts is used for MSIE, since that function
//does not return a value.
var
temp
=
"({name: 'light'})"
;
var
evalTemp
=
dojo
.
eval
(
temp
);
console
.
debug
(
"Object's name is: "
,
evalTemp
.
name
);
});
</
script
>
</
head
>
<
body
>
<
p
>
Defining global variables/functions in a module that is loaded via dojo.require()
(meaning that XHR is used to load the text of the file and then eval the text) does
not seem to define the global variables/functions on window.
</
p
>
<
p
>
The test succeeds if you see "It Worked" 3 times in the debug console, then a "Object's name is: light" message.
</
p
>
</
body
>
</
html
>
File Metadata
Details
Attached
Mime Type
text/html
Expires
Sat, Apr 26, 09:26 (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27628
Default Alt Text
testEval.html (964 B)
Attached To
rZED Zed
Event Timeline
Log In to Comment