[dojo-contributors] [patch] Forward References Confuse the Compressor

Bob Ippolito bob at redivi.com
Fri Jun 23 18:13:25 EDT 2006


On Jun 23, 2006, at 2:58 PM, Timothy Williamson wrote:

> In trying to get the wonders of custom_rhino compression to play  
> nice with TrimPath's template.js, we hit upon a bug!  Specifically,  
> the TrimPath people love to use forward references, e.g.:
> function() {
> 	function foo() {
> 		bar();
> 	}
> 	var bar = function() {
> 		alert("Hi!");
> 	}
> 	foo();
> }
>
> Dojo's custom_rhino compressor mangles this into:
> function(){
> function foo(){
> bar();
> }
> var _1=function(){
> alert("Hi!");
> };
> foo();
> }

We've run across this a few times with MochiKit as well. Is there a  
ticket for this issue I can watch?

-bob




More information about the dojo-contributors mailing list