thinkpixellab / PxLoader

PxLoader is a simple JavasScript library for creating preloaders and resource downloaders for HTML5 apps.

Home Page:http://thinkpixellab.com/pxloader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

addCompletionListener callback parameter

sprintstar opened this issue · comments

The documentation shows callbacks supplied to addCompletionListener get called with an event parameter, but it appears they don't. It would actually be useful if they did.

I fixed this by adding e as a parameter to callback in PxLoader.js on line 85.

Lines 84 to 86 should be:
if (e.completedCount === e.totalCount) {
callback(e);
}

Sorry about the delay. Thanks @mplabs for the fix!