Replace deprecated jQuery event aliases
authorFomafix <fomafix@googlemail.com>
Sun, 24 Jan 2016 20:51:05 +0000 (20:51 +0000)
committer[[mw:User:Fomafix]] <gerritpatchuploader@gmail.com>
Sun, 24 Jan 2016 20:51:05 +0000 (20:51 +0000)
In jQuery 3.0 the deprecated event aliases .load, .unload and .error get removed.
They are deprecated since jQuery 1.8:
* https://api.jquery.com/load-event/
* https://api.jquery.com/unload/
* https://api.jquery.com/error/

See major changes of jQuery 3.0 beta:
* https://blog.jquery.com/2016/01/14/jquery-3-0-beta-released/

Change-Id: Ie77b2a12c1c03645b73124c2afe79113f6ea60b5

resources/src/jquery/jquery.arrowSteps.js
resources/src/mediawiki/api/upload.js

index 629ce32..b0c36c6 100644 (file)
@@ -51,7 +51,7 @@
                $stepDiv = $steps.filter( ':not(:last-child)' ).addClass( 'arrow' ).find( 'div' );
 
                // Execute when complete page is fully loaded, including all frames, objects and images
-               $( window ).load( function () {
+               $( window ).on( 'load', function () {
                        arrowWidth = parseInt( $el.outerHeight(), 10 );
                        $stepDiv.css( paddingSide, arrowWidth.toString() + 'px' );
                } );
index 614c001..3036237 100644 (file)
                                } );
                        } );
 
-                       $iframe.error( function ( error ) {
+                       $iframe.on( 'error', function ( error ) {
                                deferred.reject( 'http', error );
                        } );