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

Object.prototype members mis-highlighted #89

Closed
satyr opened this issue Feb 8, 2011 · 6 comments · May be fixed by HijadelUFO/ace#11, ethereum-node/ace#10, aliceUnhinged613/ace#19 or sirinartk/ace#14
Closed

Comments

@satyr
Copy link
Contributor

satyr commented Feb 8, 2011

In modes that use lang.arrayToMap as dictionary, words that share the name with Object.prototype members (such as constructor or toString) are incorrectly highlighted.

@fjakobs
Copy link
Contributor

fjakobs commented Feb 8, 2011

Thanks for the bug report. I'm sorry but I don't get it. Do you have an example for me?

@satyr
Copy link
Contributor Author

satyr commented Feb 8, 2011

Try typing toString in say, Python mode.

@fjakobs
Copy link
Contributor

fjakobs commented Feb 8, 2011

Oh, now I understand. Should be easy to fix.

@fjakobs
Copy link
Contributor

fjakobs commented Feb 8, 2011

fixed. I had to use getOwnProperty() instead of object lookups.

@satyr
Copy link
Contributor Author

satyr commented Feb 8, 2011

Make sure to disclude _proto_:

javascript:alert({}.hasOwnProperty('__proto__'))

@fjakobs
Copy link
Contributor

fjakobs commented Feb 8, 2011

True. This is really the ugly side of JavaScript. Though I'll keep it for now since it will happen very rarely.

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