// Native handler
handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
- event.preventDefault();
+ if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
+ event.result = handle.apply( cur, data );
+ if ( event.result === false ) {
+ event.preventDefault();
+ }
}
}
event.type = type;
equal( errored, false, "trigger() did not throw exception" );
delete String.prototype.namespace;
});
+
+test( "Inline event result is returned (#13993)", function() {
+ expect( 1 );
+
+ var result = jQuery("<p onclick='return 42'>hello</p>").triggerHandler("click");
+
+ equal( result, 42, "inline handler returned value" );
+});