Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript AJAX Basics (retiring) Programming AJAX Parsing JSON Data

Dayne Wright
Dayne Wright
11,235 Points

onreadystatechange not camel case?

Why is onreadystatechange not camel case? I am sure there is a reason that I am missing. Can anyone explain when you use camel case and when you do not?

Thanks!

2 Answers

Jeff Lemay
Jeff Lemay
14,268 Points

Same question was asked in another thread: https://teamtreehouse.com/forum/is-there-a-reason-onreadystatechange-doesnt-follow-the-camelcase-convention

"A lot of the javascript events don't follow the camel case conventions (onclick, onmouseover, ...). So I guess the rule of thumb is that your methods should be camel case, but don't always expect events to follow suit because many were created before casing conventions became uniform."

Jeff Lemay dont be so cocky and rude -_-