summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/extended/base.js
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/Javascripts/extended/base.js')
-rw-r--r--framework/Web/Javascripts/extended/base.js12
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));
+ }
+}