Created
August 23, 2010 16:18
-
-
Save dmachi/545796 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ttrenka's connection counting function | |
(function(){ | |
var connect = 0, disconnect = 0; | |
dojo.connect(dojo, "connect", function(){ connect++; }); | |
dojo.connect(dojo, "disconnect", function(){ disconnect++; }); | |
dojo.__getConnectCount = function(){ | |
console.log("dojo.connect has run: ", connect); | |
console.log("dojo.disconnect has run: ", disconnect); | |
console.log("Total current connections: ", (connect - disconnect)); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment