If you really do not need to configure such old browsers, you can mark this check as obsolete additional code and assume that all major browsers support image preloading (and they actually do), thus have a document.images object.
The document.images object is an array of uploaded images in the current document, and you can use it to add images that will almost certainly be uploaded (for example, images with the mouse) later to achieve a smoother effect.
Validation by this condition ensures that the browser has a document.images object.
By the way, this is not the best method for designing the effect that they manage, unless you really need to do this, because CSS allows you to get better (faster and less) results.
source share