mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "ve.ui.MWMediaResultWidget: Use .on() instead of .error()"
This commit is contained in:
commit
5ef8131510
|
@ -78,9 +78,11 @@ ve.ui.MWMediaResultWidget.prototype.buildThumbnail = function () {
|
||||||
$thumb = $back.add( $front );
|
$thumb = $back.add( $front );
|
||||||
|
|
||||||
// Preload image
|
// Preload image
|
||||||
$image
|
$image.on( {
|
||||||
.load( ve.bind( this.onThumbnailLoad, this ) )
|
'load': ve.bind( this.onThumbnailLoad, this ),
|
||||||
.error( ve.bind( this.onThumbnailError, this ) );
|
'error': ve.bind( this.onThumbnailError, this )
|
||||||
|
} );
|
||||||
|
|
||||||
image.src = info.thumburl;
|
image.src = info.thumburl;
|
||||||
|
|
||||||
$thumb.addClass( 've-ui-mwMediaResultWidget-thumbnail' );
|
$thumb.addClass( 've-ui-mwMediaResultWidget-thumbnail' );
|
||||||
|
|
Loading…
Reference in a new issue