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

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  
handlers
explicitly. This also avoids the change in semantics of the script
element.

Dean

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