thinkpixellab / PxLoader

PxLoader is a simple JavasScript library for creating preloaders and resource downloaders for HTML5 apps.
http://thinkpixellab.com/pxloader
1.11k stars 173 forks source link

Error in Firefox 3.6.25: NS_ERROR_XPC_NOT_ENOUGH_ARGS #5

Closed gregorybolkenstijn closed 12 years ago

gregorybolkenstijn commented 12 years ago

I kept getting these errors in Firefox 3.6.25:

uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://[removed]/js/pxloaderimage.js :: anonymous :: line 88" data: no]

All other browsers were working correctly: Chrome, FF10, Safari, IE9-7.

I fixed it by editing line 88 in pxloaderimage.js from:

self.img.removeEventListener(eventName, eventHandler);

to

self.img.removeEventListener(eventName, eventHandler, false);

My knowledge of Javascript isn't that good, so I have no idea of what I did is correct. But it did solve my problem. I'm also not very experienced with GitHub, so I don't know how to add this as a fix as well.

I would like to know if what I did was correct and if it fixed a bug.

joelfillmore commented 12 years ago

Yes, the final parameter is optional in most browsers but it was required in older versions of Firefox.

Thanks for the fix!