W3C home > Mailing lists > Public > www-svg@w3.org > January 2006

Re: SVGT 1.2: event handler function equivalent code is invalid ECMAScript syntax

From: Maciej Stachowiak <mjs@apple.com>
Date: Thu, 12 Jan 2006 01:57:00 -0800
Message-Id: <8FADB369-388E-4F2B-A9E1-44A3E763327E@apple.com>
Cc: www-svg@w3.org, SVG WG <w3c-svg-wg@w3.org>
To: Ola Andersson <Ola.Andersson@ikivo.com>


On Jan 11, 2006, at 7:25 AM, Ola Andersson wrote:

> Hi Maciej,
> Thanks for your comment.  We have now changed to
> function(evt) {
>    // contents of handler
> }
> Let us know within two weeks if this does not address your concern.

Thanks, that satisfies my concern in this comment.

Regards,
Maciej

> Best Regards
> /The SVG WG
>
> ------
> From: Maciej Stachowiak <mjs@apple.com>
> Date: Wed, 28 Dec 2005 02:06:30 -0700
> Message-Id: <6922B403-C8C5-4633-9E5B-3579A705C81D@apple.com>
> To: www-svg@w3c.org
>
>
>
> The spec says, in section 15.5, that ECMAScript event handlers are
> equivalent to:
>
> Function(evt) {
>      // contents of handler
> }
>
> This is not syntactically valid JavaScript. "function" with a lower
> case f is the function expression keyword and would work in this
> context. "Function" with a capital "F" is the name of the Function
> constructor, but it can't take a bare identifierl as an argument, nor
> can it be followed by a block to provide the body. This needs to be
> either:
>
> function(evt) {
>      // contents of handler
> }
>
> OR
>
> new Function("evt", " // contents of handler ");
>
> Regards,
> Maciej
>
>
Received on Thursday, 12 January 2006 09:58:32 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:33 GMT