Event Dispatching
In certain situations, I have found it useful to have a reference to the original element from which an event was dispatched. e.g. onclick="dispatch(event,this)", the 'this' part. But this requires making a change to the core code base, which I generally think is bad Idea. The change I made to provide this functionality was in html.js
(the dispatch function)
Is there a better way to provides the HTML object from which the event was generated to the event handler?
(the dispatch function)
obj.dispatch = function( event, element ) {
...
line 660
from
target[type].call(obj, event);
to
target[type].call(obj, event, element);
...
}
Is there a better way to provides the HTML object from which the event was generated to the event handler?
gbegley
May 7,