mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 01:36:16 -05:00
Event: Allow constructing a jQuery.Event without a target
Fixes gh-3139 Closes gh-3140
This commit is contained in:
@@ -527,7 +527,7 @@ jQuery.Event = function( src, props ) {
|
||||
// Create target properties
|
||||
// Support: Safari <=6 - 7 only
|
||||
// Target should not be a text node (#504, #13143)
|
||||
this.target = ( src.target.nodeType === 3 ) ?
|
||||
this.target = ( src.target && src.target.nodeType === 3 ) ?
|
||||
src.target.parentNode :
|
||||
src.target;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user