Re: 'do JavaScript' still broken in Safari 3 beta
Re: 'do JavaScript' still broken in Safari 3 beta
- Subject: Re: 'do JavaScript' still broken in Safari 3 beta
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 21 Jun 2007 09:57:08 -0400
On 6/21/07, has <email@hidden> wrote:
Looks like something in the JavaScript interpreter has changed from previous versions,
as "return 1" works fine in the version of JS used by Safari 2. Unfortunately,
I'm not a JS expert (as you can tell) so I've no idea if this is by
design or accident - anyone know?
I assume it's by design. According to the standard (ECMA-262, section 12.9):
An ECMAScript program is considered syntactically incorrect if it contains a
return statement that is not within a FunctionBody.
So there ya go. But if the JS interpreter horks on the string passed
to it from AS, it seems like the AS code should get an indication of
that...
I've never understood JS's approach to exceptions and exception
handling, so ain't going there myself. :p
It's pretty similar to Java's, actually. But the treatment of syntax
errors is somewhat implementation-dependent...
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden