W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: Mutation events replacement

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Thu, 30 Jun 2011 22:10:35 +0300
Message-ID: <4E0CCA2B.7060900@helsinki.fi>
To: David Flanagan <dflanagan@mozilla.com>
CC: public-webapps <public-webapps@w3.org>
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
Received on Thursday, 30 June 2011 19:11:24 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:45 GMT