Skip to content

Commit

Permalink
🔔 #204 add crossOrigin attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
desandro committed Feb 9, 2022
1 parent 1915f05 commit c65dd83
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions imagesloaded.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ LoadingImage.prototype.check = function() {

// If none of the checks above matched, simulate loading on detached element.
this.proxyImage = new Image();
// add crossOrigin attribute. #204
if ( this.img.crossOrigin ) {
this.proxyImage.crossOrigin = this.img.crossOrigin;
}
this.proxyImage.addEventListener( 'load', this );
this.proxyImage.addEventListener( 'error', this );
// bind to image as well for Firefox. #191
Expand Down

0 comments on commit c65dd83

Please sign in to comment.