When you use addEventListene r (or addEvent in IE) to call an object
method, does it call it with the correct this parameter?
The ECMAScript reference has a lot to say about the caller using
Function.protot ype.call or Function.protot ype.apply and passing the
correct this pointer for the context, but how does addEventListene r
determine the correct this pointer. Or does it just punt and pass the
global context, thus making it impossible to refer to the object this
in an object method used as an event listener?
I could not find any reference to this in the W3C DOM-2 documentation.
/Joe
method, does it call it with the correct this parameter?
The ECMAScript reference has a lot to say about the caller using
Function.protot ype.call or Function.protot ype.apply and passing the
correct this pointer for the context, but how does addEventListene r
determine the correct this pointer. Or does it just punt and pass the
global context, thus making it impossible to refer to the object this
in an object method used as an event listener?
I could not find any reference to this in the W3C DOM-2 documentation.
/Joe
Comment