I tried to search for a JavaScript reference, but there's none available. The best two suggested sources are MDC and W3Schools.
Why?
I tried to search for a JavaScript reference, but there's none available. The best two suggested sources are MDC and W3Schools.
Why?
I would say this one is the "official":
https://developer.mozilla.org/en/JavaScript
You also have the ECMAScript Language Specification
You can try with the official ECMAscript site,
but the useful thing is actually the implementation of each browser.
I like this cheatsheet very much:
There is an official reference, it just isn't in a very convenient format. It is the ECMA-262 specification. It is a single, very large PDF document, instead of a searchable set of HTML pages.
It's not like there is an official JavaScript release. All the browsers have made their own JavaScript engine - some are using the same though. But especially Internet Explorer has its own version that doesn't support a lot of what the other browsers support, making it very difficult to make a general JavaScript reference.
Edit:
While I know there is an official ECMA standard and developement team, my point is that it doesn't really matter as long as browsers (Internet Explorer) doesn't live up to it. At the end of the day, clients want JavaScript to work for Internet Explorer too. They won't care about the ECMA standards, they just want it to work. This is here JavaScript libraries come into the picture, but that's another story.
It's the same issues with HTML and CSS, we can't use these tools for active development until:
I find the old-school Netscape 4 JavaScript docs very useful for this purpose. Although they're obviously totally outdated, and some of the DOM features in them like Layers are long gone, for the language basics they're really solid.
That's because before the days of IE supremacy and ECMA standardisation, Netscape's JavaScript was the definitive JavaScript. Other browsers pretty much had to implement exactly what you see in those old docs.
They're also much easier to read than the ECMA-262 document, which even by the standards of standards documents is an absolute horror.
Any revisions of JavaScript pages on MDC by a member of the Mozilla Documentation team (like Eric Shepherd) is official. JavaScript is officially maintained by Mozilla so only documentation by Mozilla is official. The only engines that support JavaScript are currently made by Mozilla and every other engine implements ECMAScript. JavaScript and ECMAScript have quite a few differences (for example, the awesome let
statement).
It is very difficult to have an "official" reference as long as there are implementations (in all browsers) and there is a specification (ECMAScript) but no conformance tests of implementations against the specifications.
Now though, we have the EMCAScript 5 conformance suite at http://es5conform.codeplex.com/ - and there seems some consensus that ECMAScript implementations will come closer together, making ECMAScript more likely to be the official reference for the language.
If you're using ECMAScript for the web (which 99.9% of people are), then beyond the basics syntactics of the language (covered in the ECMA-262 spec mentioned above), what you're probably looking for is a DOM reference - which is the ECMAScript API that's used to interact with web documents.
I'm very surprised noone has mentioned the DOM api sofar. Current W3C DOM standard is here: http://www.w3.org/TR/DOM-Level-2-Core/
(btw, as for the naming confusion - ECMAScript is the name of the official standard, and "Javascript" and "JScript" are Netscape and Microsoft's proprietary "forks")
I really like Daniel Krook's apidoc, even though it could use some explanations and examples. I would really like to see a krook w3school mashup.
By “official”, I think you mean “written by the people responsible for JavaScript”.
Just speculating here really, but the people responsible for JavaScript (the ECMA) don’t directly make any money out of it, and probably don’t have any particular skills in writing reference documentation. So they have neither the incentive nor the ability to write a good reference.
Personally, I like JavaScript: the Definitive Guide from O’Reilly. There’s a sixth edition coming out in November.