Re: SVGT 1.2: <handler> script scope and `this' object

*Maciej Stachowiak wrote:

>2) Event listeners attached via addEventListener or via event handler  
>attributes run with this "this" object bound to the EventTarget to  
>which they are attached (the "observer" in XML Events parlance). This  
>is extremely useful behavior. The SVGT 1.2 spec does not make clear  
>whether this happens or not. It doesn't say whether the function  
>created from a <handler> body is attached with addEventListener, or  
>acts as if it had been. Please specify that the function object  
>created from a <handler> acts as if attached in this way.
>
>3) Event listeners attached via event handler attributes (at least in  
>html) run with the element to which they are attached (the observer,  
>effectively) pushed into the scope chain. This is extremely useful  
>and makes it easy to write quick inline scripts. SVGT 1.2 should  
>specify this behavior for <handler> as well for ease of use and  
>consistency.


Thank you very much for your comments and suggestions. We have modified the spec to indicate that "the element with which the event listener is registered ( the observer ) is pushed into the scope chain and is bound to the this keyword". Please let us know within two weeks if this does not satisfy your concern.

Best regards,
Andrew, on behalf of the SVG Working Group


________________________________________
Andrew Emmons 
Software Architect
SVGT Player
Open Text Corporation, BitFlash Division
515 Legget Drive, Suite 300
Ottawa ON K2K 3G4

Tel: 613.599.9335 ext.3248
Fax: 613.599.9177
Web: www.bitflash.com 
www.opentext.com
________________________________________

Received on Thursday, 15 June 2006 16:48:15 UTC