ginebra2/chrome/js/Bind.js
branchGCC_SURGE
changeset 8 2e16851ffecd
parent 5 0f2326c2a325
--- a/ginebra2/chrome/js/Bind.js	Fri Jun 11 16:23:26 2010 +0100
+++ b/ginebra2/chrome/js/Bind.js	Thu Jul 22 16:30:16 2010 +0100
@@ -1,12 +1,14 @@
 
+// Bind a function’s scope at definition instead of execution.  Useful
+// for controlling the 'this' pointer in callbacks.
 Function.prototype.bind = function(obj) {
     var method = this,
     temp = function() {
         return method.apply(obj, arguments);
     };
- 
+
     return temp;
-} 
+}
 
 function createDelegate(object, method) {
     var shim = function()