mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 06:35:03 -05:00
Event: Allow constructing a jQuery.Event without a target
Fixes gh-3139 Closes gh-3140
This commit is contained in:
@@ -2736,6 +2736,15 @@ QUnit.test( ".off() removes the expando when there's no more data", function( as
|
||||
}
|
||||
} );
|
||||
|
||||
QUnit.test( "jQuery.Event( src ) does not require a target property", function( assert ) {
|
||||
assert.expect( 2 );
|
||||
|
||||
var event = jQuery.Event( { type: "offtarget" } );
|
||||
|
||||
assert.equal( event.type, "offtarget", "correct type" );
|
||||
assert.equal( event.target, undefined, "no target" );
|
||||
} );
|
||||
|
||||
QUnit.test( "preventDefault() on focusin does not throw exception", function( assert ) {
|
||||
assert.expect( 1 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user