jeff said:
What is the point of this? You don't expect the code in the posting to be
executed somehow, do you?
I accidentally discovered that doing this:
var class="X";
Crashes Safari javascript.
If by "crashes" you mean that this code does not compile because of a syntax
error, then it works as designed: `class' has been a future reserved word
since at least ECMAScript Edition 3. If it actually crashes the browser,
though, then that would be is a very serious bug in that Safari version.
So, is there a list of reserved words in javascript,
No, because, despite loud oversimplifying claims to the contrary, there is
no "javascript".¹
However, the ECMAScript (ES) Language Specification, the standard which
Netscape/Mozilla.org _JavaScript_ and other implementations, including Apple
JavaScriptCore, are based on, defines several keywords and future reserved
words.
Implementations may also define their own reserved words to complement the
specified ones (e.g. `yield' in JavaScript 1.7+, now also mentioned in ES5).
You find them documented at the respective Web site (for example, at the
MSDN Library for Microsoft JScript).
and is there a javascript error console in Safari?
For fitting values of "javascript", yes.
Finding that took entirely to long...
I doubt you have searched for it.
______
¹ <
http://PointedEars.de/es-matrix>