Re: Mutation events replacement

On 6/30/11 12:10 PM, Olli Pettay wrote:
> On 06/30/2011 09:36 PM, David Flanagan wrote:
>>> [Callback, NoInterfaceObject]
>>> interface MutationCallback
>>> {
>>> // aNode is the node to which the listener was added.
>>> // aChangeTarget is the node in which the mutation was made.
>>> void handleMutation(in Node aNode, in Node aChangeTarget);
>>> };
>>
>> Won't the callback be invoked as if it were a method of the node to
>> which the listener was added? That is, inside the callback function
>> won't the value of 'this' be the same as the value of the aNode 
>> argument?
>
> 'this' won't be the same as aNode if
> { handleMutation: function(aNode,aChangeTarget) { ... } }
> syntax is used.
>
>
> -Olli
>
Oops.  I saw the Callback=FunctionOnly on Jonas's original proposal and 
didn't notice that you'd changed it to just Callback.  Sorry.

Received on Thursday, 30 June 2011 20:19:27 UTC