jenkins-bot has submitted this change and it was merged. Change subject: ve.ui.MWMediaResultWidget: Use .on() instead of .error() ......................................................................
ve.ui.MWMediaResultWidget: Use .on() instead of .error() > JQMIGRATE: jQuery.fn.error() is deprecated. While at it, also avoid using the overloaded .load(). It has quite a few different signatures (one of them is to load $.ajax by url and replace the contents of the element, completely unrelated), and calling .on() directly is quicker as well. Change-Id: I139b0c603577b5a0102d2ff679bd86b792830e3e --- M modules/ve-mw/ui/widgets/ve.ui.MWMediaResultWidget.js 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWMediaResultWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWMediaResultWidget.js index 9164778..f907abf 100755 --- a/modules/ve-mw/ui/widgets/ve.ui.MWMediaResultWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWMediaResultWidget.js @@ -78,9 +78,11 @@ $thumb = $back.add( $front ); // Preload image - $image - .load( ve.bind( this.onThumbnailLoad, this ) ) - .error( ve.bind( this.onThumbnailError, this ) ); + $image.on( { + 'load': ve.bind( this.onThumbnailLoad, this ), + 'error': ve.bind( this.onThumbnailError, this ) + } ); + image.src = info.thumburl; $thumb.addClass( 've-ui-mwMediaResultWidget-thumbnail' ); -- To view, visit https://gerrit.wikimedia.org/r/132013 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I139b0c603577b5a0102d2ff679bd86b792830e3e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Esanders <esand...@wikimedia.org> Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: Trevor Parscal <tpars...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits