preRun Event

Summary

Occurs when the Run method is called, sending out ImageLoaderPreRunEventArgs.

Syntax
TypeScript
JavaScript
Object.defineProperty(ImageLoader.prototype,'preRun',  
	get: function(), 
	set: function(value) 
) 
preRun: LeadEvent; 

Remarks

PreRun is called after Run but before any configuration of the Xhr or WorkingImageElement.

The PreRun event handler is useful in situations where Run is called based on a page event, to run additional code before the request is sent.

The ImageLoaderPreRunEventArgs.Cancel property, when set to true, will cause the Fail and Always events to be invoked. This is different than the Abort method, which will fail silently and not call any callbacks.

By contrast, PreSend is a static event that is called by each ImageLoader after PreRun and after all properties (except the final HTMLImageElement.src property for ImageLoaderUrlMode.ImageUrl, as this would send the request) are set.

Event Data

ParameterTypeDescription
sendervarThe source of the event.
eImageLoaderPreRunEventArgsThe event data.

Requirements

Target Platforms

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly