Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Firefox 3.6.25: NS_ERROR_XPC_NOT_ENOUGH_ARGS #5

Closed
gregorybolkenstijn opened this issue Feb 3, 2012 · 1 comment
Closed

Comments

@gregorybolkenstijn
Copy link

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
Copy link
Member

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

Thanks for the fix!

teddyzeenny pushed a commit to teddyzeenny/rsvp.js that referenced this issue Nov 22, 2013
The third argument for `addEventListener` and `removeEventListener`
is supposed to be optional, defaulting to `false`, but some browsers
(notably older versions of FireFox) require it.

See thinkpixellab/PxLoader#5 and
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.removeEventListener
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants