IE @cc_on breaks dojo.require
We have 3rd party component we use that uses conditional compilation in several places. Within IE(6&7), after a @cc_on statement, all dojo.require's fail. This is new to dojo 0.9.
I have debugged the following, and it errors when trying to eval the downloaded JavaScript?. The script looks fine, but the voodoo in dojo.eval fails with a helpful "SyntaxError?" from IE.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Test Page</title>
<script type="text/javascript" src="scripts/dojo/dojo.js" djconfig="parseOnLoad: true, isDebug: true"></script>
<script type="text/javascript">
/*@cc_on
/*@if (@_win32)
document.write("OS is 32-bit, browser is IE.");
@else @*/
document.write("Browser is not IE (ie: is Firefox) or Browser is not 32 bit IE.");
/*@end
@*/
dojo.require("dojo.parser");
</script>
</head>
<body>
</body>
</html>
Change History (3)
Milestone: |
→ 1.2
|
Owner: |
changed from alex to James Burke
|
Description: |
modified (diff)
|
Resolution: |
→ fixed
|
Status: |
new →
closed
|
This appears to be fixed now on the trunk. I think it was actually fixed in the Dojo 1.1 timeframe, when the code changed to how the firebug eval debugging filename hint was added.