img.onload = function()

in toolkit/jb/shared.js [113:124]


        img.onload = function() {
            //console.log('received', imgSpec.path);
            cachedImages[imgSpec.id] = img;
            readyImgCount++;
            //console.log('images ready:', readyImgCount + '/' + imagesToLoad.length);
            showLoaderAt(readyImgCount / imagesToLoad.length, 'Loading Images');
            if (readyImgCount == imagesToLoad.length) {
                if (onComplete) onComplete();
                hideLoader();
                //console.log('finished loading images');
            }
        };