• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 'do JavaScript' still broken in Safari 3 beta
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: 'do JavaScript' still broken in Safari 3 beta
      • From: has <email@hidden>
References: 
 >Re: 'do JavaScript' still broken in Safari 3 beta (From: has <email@hidden>)

  • Prev by Date: Re: 'do JavaScript' still broken in Safari 3 beta
  • Next by Date: Scripting Interface Design
  • Previous by thread: Re: 'do JavaScript' still broken in Safari 3 beta
  • Next by thread: Re: 'do JavaScript' still broken in Safari 3 beta
  • Index(es):
    • Date
    • Thread