diff options
author | wei <> | 2006-01-16 02:43:30 +0000 |
---|---|---|
committer | wei <> | 2006-01-16 02:43:30 +0000 |
commit | ca47a8c7fd5eb9f34ac00a2f1a843859d6123dd8 (patch) | |
tree | 436215c674c4ef68335bf9b3cfe1387236d762ff /framework/Web/Javascripts/extended/base.js | |
parent | 2d6584b56f0c52686f868c4c7dafc44db0f7c5cf (diff) |
Diffstat (limited to 'framework/Web/Javascripts/extended/base.js')
-rw-r--r-- | framework/Web/Javascripts/extended/base.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/framework/Web/Javascripts/extended/base.js b/framework/Web/Javascripts/extended/base.js index 145b003f..59a3c3a0 100644 --- a/framework/Web/Javascripts/extended/base.js +++ b/framework/Web/Javascripts/extended/base.js @@ -21,4 +21,14 @@ function $(n,d) { if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=DOM.find(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
-}
\ No newline at end of file +}
+
+/**
+ * Similar to bindAsEventLister, but takes additional arguments.
+ */
+Function.prototype.bindEvent = function() {
+ var __method = this, args = $A(arguments), object = args.shift();
+ return function(event) {
+ return __method.call(object, [event || window.event].concat(args));
+ }
+}
|