[Dojo-checkins] r964 - src/event

dojo-checkins at dojotoolkit.org dojo-checkins at dojotoolkit.org
Wed Jul 27 10:36:22 PDT 2005


Author: alex
Date: Wed Jul 27 10:36:20 2005
New Revision: 964

Modified:
   src/event/Event.js
Log:
turns of for(x in namespace) iteration by default. Must now be explicitly enabled via djConfig.slowAnonFuncLookups = true; 


Modified: src/event/Event.js
==============================================================================
--- src/event/Event.js	(original)
+++ src/event/Event.js	Wed Jul 27 10:36:20 2005
@@ -8,11 +8,13 @@
 
 	this.nameAnonFunc = function(anonFuncPtr, namespaceObj){
 		var nso = (namespaceObj || this.anon);
-		for(var x in nso){
+		if((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"] == true)){
+			for(var x in nso){
 				if(nso[x] === anonFuncPtr){
 						dj_debug(x);
 						return x;
 				}
+			}
 		}
 		var ret = "_"+anonCtr++;
 		while(typeof nso[ret] != "undefined"){


More information about the Dojo-checkins mailing list