aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.js
diff options
context:
space:
mode:
authorPhil Crosby2012-05-04 23:09:04 -0700
committerPhil Crosby2012-05-05 18:32:13 -0700
commit238d7c86f4518331cf7563d6baf622401e07a59c (patch)
treef69a9e1343165f8203c3a7eb885d49714c1fd05b /lib/utils.js
parent55d13097c9ff8f6301a4bf64b42740ae5edcf71c (diff)
downloadvimium-238d7c86f4518331cf7563d6baf622401e07a59c.tar.bz2
use proxy instead of self
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 3a355d7b..d6b7bb93 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -160,7 +160,10 @@ var utils = {
};
/* Execute a function with the given value for "this". Equivalent to jQuery.proxy(). */
-Function.prototype.proxy = function(fn, self) { return function() { fn.apply(self, arguments); }; };
+Function.prototype.proxy = function(self) {
+ var fn = this;
+ return function() { return fn.apply(self, arguments); };
+};
/*