Re: js/dom and "this" referencing

Boris Zbarsky <[email protected]> Tue, 11 May 2010 13:29:30 -0400
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
On 5/11/10 12:43 PM, rvj wrote:
> just from a methods invoked initially from constructor in the binding
> which may call other methods using addeventlistener
>
> my dumb approach is just to  create a common variable within the binding
> constructor
>
>      thisbinding=this
>
> and then use thisbinding rather than this instead

Yes, that's exactly the right approach.

> ... seems to work ok but just seems strange

Why?

> I just thought that there might be something like top.this to refer the
> bindiing xulelement

No.

-Boris