Hello everybody,
I have spent a few hours this day to work around the missing
currentTarget property of event in IE.
I modified therefore the core lib around line 4000 (v1.6.0)
observe: function(element, eventName, handler) {
element = $(element);
var name = getDOMEventName(eventName);
var wrapper = createWrapper(element, eventName, handler);
if (!wrapper) return element;
if (element.addEventListener) {
element.addEventListener(name, wrapper, false);
} else {
// instead of:
// element.attachEvent("on" + name, wrapper);
element.attachEvent("on" + name, function(e){
e.currentTarget = element;
wrapper(e);
});
}
return element;
},
I hope some of you will find is as useful as myself...
Regards: Daniel Varga
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---