On Sep 16, 2008, at 12:21 AM, liorean wrote:

> 2008/9/16 William Edney <[EMAIL PROTECTED]>:
>> Could I do an assignment of the handler? Sure, but syntactically
>> suboptimal, IMHO.
>
> Once JScript has fixed the function name scope bug, you could use
>
>     myElem.addEventListener(
>         'click',
>         function f(){
>             doSomething();
>             this.removeEventListener(
>                 'click',
>                 f,
>                 false);},
>         false);

Or to work around the JScript bug:

     (function () {
         function f(){
             doSomething();
             this.removeEventListener('click', f, false);
         }
         myElem.addEventListener('click', f, false);
     })();

Lots of workarounds, none free, but still possibly tolerable or even  
not measurable in performance and memory costs.

In case anyone missed it,

http://wiki.ecmascript.org/doku.php?id=proposals:stack_inspection

Ignore the type parameter and annotations, to see the essential  
proposal.

/be
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to