branch | GCC_SURGE |
changeset 8 | 2e16851ffecd |
parent 2 | bf4420e9fa4d |
parent 6 | 1c3b8676e58c |
2:bf4420e9fa4d | 8:2e16851ffecd |
---|---|
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 } |