mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
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:
@@ -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'" );
|
||||
|
||||
Reference in New Issue
Block a user