ginebra2/chrome/js/Bind.js
changeset 5 0f2326c2a325
parent 0 1450b09d0cfd
--- a/ginebra2/chrome/js/Bind.js	Fri May 14 15:40:36 2010 +0300
+++ b/ginebra2/chrome/js/Bind.js	Wed Jun 23 17:59:43 2010 +0300
@@ -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()