ginebra2/chrome/js/Bind.js
changeset 0 1450b09d0cfd
child 3 0954f5dd2cd0
equal deleted inserted replaced
-1:000000000000 0:1450b09d0cfd
       
     1 
       
     2 Function.prototype.bind = function(obj) {
       
     3     var method = this,
       
     4     temp = function() {
       
     5         return method.apply(obj, arguments);
       
     6     };
       
     7  
       
     8     return temp;
       
     9 } 
       
    10 
       
    11 function createDelegate(object, method) {
       
    12     var shim = function()
       
    13         {
       
    14             method.apply(object, arguments);
       
    15         }
       
    16 
       
    17     return shim;
       
    18 }