function _addImageLoadListeners() {
            var imgs = document.querySelectorAll('img');
            for (var i = 0; i < imgs.length; i++) {
                var image = imgs[i];
                // Do nothing if image is already loaded
                if (image.nodeName === 'IMG' &&
                    image.src &&
                    image.complete === false &&
                    image.readyState !== 4)
                {
                    _addImage(image);
                }
            }
        }
/**
         * Filter out images in the DOM that haven't loaded yet and add listener
         */
Filter out images in the DOM that haven't loaded yet and add listener
Filter out images in the DOM that haven ' t loaded yet and add listener
function _addImageLoadListeners() {
            var imgs = document.querySelectorAll('img');
            for (var i = 0; i < imgs.length; i++) {
                var image = imgs[i];
                if (image.nodeName === 'IMG' &&
                    image.src &&
                    image.complete === false &&
                    image.readyState !== 4)
                {
                    _addImage(image);
                }
            }
        }
function _addImageLoadListeners ( ) { var imgs = document . querySelectorAll ( 'img' ) ; for ( var i = 0 ; i < imgs . length ; i ++ ) { var image = imgs [ i ] ; if ( image . nodeName === 'IMG' && image . src && image . complete === false && image . readyState !== 4 ) { _addImage ( image ) ; } } }
Filter out images in the DOM that haven't loaded yet and add listener
Filter out images in the DOM that haven ' t loaded yet and add listener
// Do nothing if image is already loaded