W3C home > Mailing lists > Public > www-svg@w3.org > November 2005

Re: [SVGMobile12] <handler> element is necessary?

From: Dean Jackson <dino@w3.org>
Date: Thu, 3 Nov 2005 22:24:41 +1100
Message-Id: <343780CC-61EE-4B04-8BE9-A4D655DEE306@w3.org>
Cc: www-svg@w3.org
To: KONO Masahiko <kono.masahiko@canon.co.jp>

I think my response needs some clarification.

On 03/11/2005, at 1:12 AM, Dean Jackson wrote:

> Hello Kono-san,
> On 19/05/2005, at 7:17 PM, KONO Masahiko wrote:
>> 15.4 The handler element
>> <handler> element is different from <script> element in evaluation
>> timing.  I think this difference is small.  Is <script> element which
>> is added new attribute evaluate='load'|'called', and so on  
>> sufficient?
> Unfortunately not. The <handler> element defines a single function  
> to be
> used as an event handler, while <script> has a different semantic  
> meaning
> (it's for defining all sorts of code). We think the difference is  
> enough
> to justify a different element.

Since the XML Events specification leaves it up to the host language, in
this case SVG, to define event handlers, we decided to add a <handler>
element. The semantics for a <script> element are very different from
a simple event handler (it's not just whether or not the code is
executed at load time).

>> And <handler> element has ev:event attribute.  Is <script> element  
>> and
>> <ev:listener> element sufficient?
> This functionality is provided with XML Events.

What I meant to say is that while you can achieve something similar with
<ev:listener>, the WG believe it is more straightforward to code  
explicitly. This also avoids the change in semantics of the script

Received on Thursday, 3 November 2005 11:28:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:08 UTC