equal
deleted
inserted
replaced
|
1 // A getter-setter method that preserves the appropriate `this` context. |
|
2 d3.rebind = function(object, method) { |
|
3 return function() { |
|
4 var x = method.apply(object, arguments); |
|
5 return arguments.length ? object : x; |
|
6 }; |
|
7 }; |