Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ jQuery.Event = function( src, props ) {
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
constructor: jQuery.Event,
isDefaultPrevented: returnFalse,
isPropagationStopped: returnFalse,
isImmediatePropagationStopped: returnFalse,
Expand Down
4 changes: 3 additions & 1 deletion test/unit/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ if ( window.onbeforeunload === null &&

test("jQuery.Event( type, props )", function() {

expect(5);
expect(6);

var event = jQuery.Event( "keydown", { keyCode: 64 }),
handler = function( event ) {
Expand All @@ -1458,6 +1458,8 @@ test("jQuery.Event( type, props )", function() {

ok( "keyCode" in event, "Special 'keyCode' property exists" );

strictEqual( jQuery.isPlainObject( event ), false, "Instances of $.Event should not be identified as a plain object." );

jQuery("body").on( "keydown", handler ).trigger( event );

jQuery("body").off( "keydown" );
Expand Down