summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/extended
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/Javascripts/extended')
-rw-r--r--framework/Web/Javascripts/extended/base.js2
-rw-r--r--framework/Web/Javascripts/extended/event.js18
2 files changed, 10 insertions, 10 deletions
diff --git a/framework/Web/Javascripts/extended/base.js b/framework/Web/Javascripts/extended/base.js
index d3d8fb63..8975e1cc 100644
--- a/framework/Web/Javascripts/extended/base.js
+++ b/framework/Web/Javascripts/extended/base.js
@@ -29,7 +29,7 @@ function $(n,d) {
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));
+ return __method.apply(object, [event || window.event].concat(args));
}
}
diff --git a/framework/Web/Javascripts/extended/event.js b/framework/Web/Javascripts/extended/event.js
index dd72d60e..a7514cda 100644
--- a/framework/Web/Javascripts/extended/event.js
+++ b/framework/Web/Javascripts/extended/event.js
@@ -16,7 +16,7 @@ Object.extend(Event, {
if (name == 'keypress' &&
((navigator.appVersion.indexOf('AppleWebKit') > 0)
- || (element && element.attachEvent)))
+ || element.attachEvent))
name = 'keydown';
this._observeAndCache(element, name, observer, useCapture);
@@ -26,20 +26,20 @@ Object.extend(Event, {
return e.keyCode != null ? e.keyCode : e.charCode
},
- fireEvent : function(el,type)
+ fireEvent : function(element,type)
{
if(document.createEvent)
{
- var evt = document.createEvent('HTMLEvents');
- evt.initEvent(type, true, true);
- el.dispatchEvent(evt);
+ var event = document.createEvent('HTMLEvents');
+ event.initEvent(type, true, true);
+ element.dispatchEvent(event);
}
- else if(el.fireEvent)
+ else if(element.fireEvent)
{
- el.fireEvent('on'+type);
- el[type]();
+ element.fireEvent('on'+type);
+ element[type]();
}
else
- el[type]();
+ element[type]();
}
}); \ No newline at end of file