changeset 3 | 0954f5dd2cd0 |
parent 1 | b0dd75e285d2 |
child 4 | d5cdb6bc139d |
1:b0dd75e285d2 | 3:0954f5dd2cd0 |
---|---|
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 } |