Fake trigger events now get passed through $.event.fix() first, to give them an extra layer of authenticity.

This commit is contained in:
John Resig 2006-06-16 00:02:54 +00:00
parent f9dbb9f73a
commit 34dd8afb25

2
jquery/jquery.js vendored
View file

@ -803,7 +803,7 @@ $.event.remove = function(element, type, handler) {
}; };
$.event.trigger = function(element,type,data) { $.event.trigger = function(element,type,data) {
data = data || [{ type: type }]; data = data || [ $.event.fix({ type: type }) ];
if ( element && element["on" + type] ) { if ( element && element["on" + type] ) {
$.apply( element, element["on" + type], data ); $.apply( element, element["on" + type], data );
} }