code: function() {
          var img = this.imgDiv;
          this.stopLoading();
          img.style.visibility = 'inherit';
          img.style.opacity = this.layer.opacity;
          this.isLoading = false;
          this.canvasContext = null;
          this.events.triggerEvent("loadend");
  
          if (this.layerAlphaHack === true) {
              img.style.filter =
                  "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
                  img.src + "', sizingMethod='scale')";
          }
      }
docs: Method: onImageLoad
  Handler for the image onload event