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

Already on GitHub? Sign in to your account

Rename `throws` #322

Closed
mathiasbynens opened this Issue Sep 20, 2012 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

mathiasbynens commented Sep 20, 2012

throws is an ES3 reserved word. This line causes an error in some older engines, including NarwhalJS: https://github.com/jquery/qunit/blob/e34ffb61488459f6823ded82e19865ba4b46e2ed/qunit/qunit.js#L499

See http://mothereff.in/js-properties#throws; either rename throws into something else, or quote the property name. (Renaming is probably safest though.)

To fix this, this line will need to be changed as well: https://github.com/jquery/qunit/blob/e34ffb61488459f6823ded82e19865ba4b46e2ed/qunit/qunit.js#L549 Use ['throws'] instead of throws here, or just rename the property to something that has never been a reserved word.

Contributor

mathiasbynens commented Sep 24, 2012

Patch attached in pull request #323.

Krinkle added a commit that referenced this issue Sep 27, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment