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

catch property needs to be quoted in Android 2.3 #2478

Closed
mgol opened this issue Jul 18, 2015 · 6 comments
Closed

catch property needs to be quoted in Android 2.3 #2478

mgol opened this issue Jul 18, 2015 · 6 comments
Assignees
Milestone

Comments

@mgol
Copy link
Member

mgol commented Jul 18, 2015

Apparently Android 2.3 doesn't like a catch property and so it fails deferred tests completely since 84ccf26. We need to quote it as on the compat branch.

Do we have any way to ensure we don't change it back without turning on the JSHint es3 option? :/ Or maybe via JSCS? cc @rwaldron @markelog.

@mgol mgol added the Deferred label Jul 18, 2015
@mgol mgol self-assigned this Jul 18, 2015
@mgol mgol added this to the 3.0.0 milestone Jul 18, 2015
@mgol mgol removed their assignment Jul 18, 2015
@mgol
Copy link
Member Author

mgol commented Jul 18, 2015

Or maybe we should just turn on the es3 option on master, preferably with a comment that Android 2.3 needs it.

@markelog
Copy link
Member

Probably easier to left a comment in the source code? As inline rule or just as a warning?

@mgol
Copy link
Member Author

mgol commented Jul 18, 2015 via email

@mgol mgol changed the title catch needs to be accessed via the array syntax in Android 2.3 catch property needs to be quoted in Android 2.3 Jul 18, 2015
@mgol mgol self-assigned this Jul 18, 2015
@markelog
Copy link
Member

there may be other reserved words that don't work as property names

Is there? Every reserved word should trigger such error, if that the case, then we should enable es3.

@mgol
Copy link
Member Author

mgol commented Jul 19, 2015

Every reserved word should trigger such error

I didn't check all but at least catch, class & else trigger this error. They all work on Android 4.0.

mgol added a commit to mgol/jquery that referenced this issue Jul 19, 2015
Android 2.3 chokes on unquoted reserved words being used as property names
which was making Deferred tests not run.

Acknowledge the sad fact that Android 2.3 is not ES5-compliant browser
and enable the "es3" option in JSHint config.

Fixes jquerygh-2478
@mgol
Copy link
Member Author

mgol commented Jul 19, 2015

PR: #2481.

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

No branches or pull requests

2 participants