Oh well, if removing after first click is the use-case,
`el.addEventListener('click',
this.onClick, {once: true})` is already in the standard pipeline (and
polyfilled in dom4)

Best Regards

On Mon, May 9, 2016 at 5:41 PM, Boris Zbarsky <[email protected]> wrote:

> On 5/9/16 12:37 PM, Mark Kennedy wrote:
>
>> and also REMOVING the event listeners manually.
>>
>
> I think this is the key part.  What is the precise use case for removing
> here?  I think that affects how this would best be designed.
>
> The obvious case is when you want to remove the listener at the point when
> it fires.  This would be most easily addressed by providing a way to get at
> the listener from inside itself somehow.  Are there other uses?
>
> -Boris
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to