Silent Javascript Error in Safari
If you define a variable name as “private” in Javascript, Safari will terminate your code from there. It doesn’t give any error message. This only happens in Safari. IE/IE7, Mozilla Firefox and Opera don’t have this problem. I think the keyword “private” and “public” is conserved for some function in Safari, some OOP thing? Wasted quite a few hours in it…
Actually if you enable the javascript debugger in Safari you will get a ‘Parse Error’ warning informing you of the line number of your infraction… at least that helps narrow it down. I spent about 35 seconds on this problem, not the few hours mentioned above…
The JS debugger is a lifesaver, enable it if you haven’t already.
“do” is also on this list of reserved variables.
@Matt: Correct, I use the debugger as well, but still … ;-( Why is the browser conflicting with the user namespace?