Followup to #8753. Modify new Event constructor signature to jQuery.event(type, props), which can be exploited by jQuery.event.trigger as well.
This commit is contained in:
parent
6d49e84daf
commit
bebd8bc01e
2 changed files with 11 additions and 17 deletions
|
@ -978,11 +978,11 @@ test("trigger(eventObject, [data], [fn])", function() {
|
|||
$parent.unbind().remove();
|
||||
});
|
||||
|
||||
test("jQuery.Event({ /* props */ })", function() {
|
||||
test("jQuery.Event( type, props )", function() {
|
||||
|
||||
expect(4);
|
||||
|
||||
var event = jQuery.Event({ type: "keydown", keyCode: 64 }),
|
||||
var event = jQuery.Event( "keydown", { keyCode: 64 }),
|
||||
handler = function( event ) {
|
||||
ok( "keyCode" in event, "Special property 'keyCode' exists" );
|
||||
equal( event.keyCode, 64, "event.keyCode has explicit value '64'" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue