author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:30:16 +0100 | |
branch | GCC_SURGE |
changeset 8 | 2e16851ffecd |
parent 5 | 0f2326c2a325 |
permissions | -rw-r--r-- |
// Bind a function’s scope at definition instead of execution. Useful // for controlling the 'this' pointer in callbacks. Function.prototype.bind = function(obj) { var method = this, temp = function() { return method.apply(obj, arguments); }; return temp; } function createDelegate(object, method) { var shim = function() { method.apply(object, arguments); } return shim; }