Merge branch 'eventprops.1.6final' of https://github.com/rwldrn/jquery into rwldrn-eventprops.1.6final
Conflicts: test/unit/event.js
This commit is contained in:
commit
2c74ee46ee
2 changed files with 36 additions and 4 deletions
|
@ -975,6 +975,27 @@ test("trigger(eventObject, [data], [fn])", function() {
|
|||
$parent.unbind().remove();
|
||||
});
|
||||
|
||||
test("jQuery.Event({ /* props */ })", function() {
|
||||
|
||||
expect(4);
|
||||
|
||||
var event = jQuery.Event({ type: "keydown", keyCode: 64 }),
|
||||
handler = function( event ) {
|
||||
ok( "keyCode" in event, "Special property 'keyCode' exists" );
|
||||
equal( event.keyCode, 64, "event.keyCode has explicit value '64'" );
|
||||
};
|
||||
|
||||
// Supports jQuery.Event implementation
|
||||
equal( event.type, "keydown", "Verify type" );
|
||||
|
||||
ok( "keyCode" in event, "Special 'keyCode' property exists" );
|
||||
|
||||
jQuery("body").bind( "keydown", handler ).trigger( event );
|
||||
|
||||
jQuery("body").unbind( "keydown" );
|
||||
|
||||
});
|
||||
|
||||
test("jQuery.Event.currentTarget", function(){
|
||||
expect(1);
|
||||
|
||||
|
@ -2151,3 +2172,4 @@ test("event properties", function() {
|
|||
}).click();
|
||||
});
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue