Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#3960 closed defect (fixed)

IE @cc_on breaks dojo.require

Reported by: guest Owned by: James Burke
Priority: high Milestone: 1.1
Component: Loader Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by James Burke)

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)

comment:1 Changed 11 years ago by dylan

Milestone: 1.2
Owner: changed from alex to James Burke

comment:2 Changed 11 years ago by James Burke

Description: modified (diff)
Resolution: fixed
Status: newclosed

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.

comment:3 Changed 11 years ago by bill

Milestone: 1.21.1
Note: See TracTickets for help on using tickets.