aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2015-12-22 15:19:13 +0300
committerOleg Gaidarenko <markelog@gmail.com>2015-12-22 15:19:13 +0300
commita57975fb74d6abfc9479ad06d2b524866ac5a7d8 (patch)
tree9d674d5da3afe7e620350d31a11116f55140ed34
parentfa92796af8f80b7ab86c8d63de6bced0dfe305b6 (diff)
downloadjquery-a57975fb74d6abfc9479ad06d2b524866ac5a7d8.tar.gz
jquery-a57975fb74d6abfc9479ad06d2b524866ac5a7d8.zip
Revert "Event: remove deprecated event aliases"
This reverts commit ef30bdf4f1b361b6f2e99f5b7233b419f95a62f2.
-rw-r--r--src/event/alias.js4
-rw-r--r--test/unit/event.js9
2 files changed, 10 insertions, 3 deletions
diff --git a/src/event/alias.js b/src/event/alias.js
index 75467353c..e94dc8c3a 100644
--- a/src/event/alias.js
+++ b/src/event/alias.js
@@ -3,9 +3,9 @@ define( [
"../event"
], function( jQuery ) {
-jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup contextmenu" ).split( " " ),
+ "change select submit keydown keypress keyup error contextmenu").split(" "),
function( i, name ) {
// Handle event binding
diff --git a/test/unit/event.js b/test/unit/event.js
index 274cf41b5..e8201f93c 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -906,7 +906,7 @@ QUnit.test( "mouseenter, mouseleave don't catch exceptions", function( assert )
if ( jQuery.fn.click ) {
QUnit.test( "trigger() shortcuts", function( assert ) {
- assert.expect( 5 );
+ assert.expect( 6 );
var counter, clickCounter,
elem = jQuery( "<li><a href='#'>Change location</a></li>" ).prependTo( "#firstUL" );
@@ -938,6 +938,13 @@ if ( jQuery.fn.click ) {
jQuery( "#simon1" ).click();
assert.equal( clickCounter, 1, "Check that click, triggers onclick event handler on an a tag also" );
+ elem = jQuery("<img />").load(function(){
+ ok( true, "Trigger the load event, using the shortcut .load() (#2819)");
+ }).load();
+
+ // manually clean up detached elements
+ elem.remove();
+
// test that special handlers do not blow up with VML elements (#7071)
jQuery( "<xml:namespace ns='urn:schemas-microsoft-com:vml' prefix='v' />" ).appendTo( "head" );
jQuery( "<v:oval id='oval' style='width:100pt;height:75pt;' fillcolor='red'> </v:oval>" ).appendTo( "#form" );