ginebra/chrome/js/Bind.js
changeset 5 0f2326c2a325
parent 1 b0dd75e285d2
child 6 1c3b8676e58c
equal deleted inserted replaced
1:b0dd75e285d2 5:0f2326c2a325
     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 }