W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2009

Re: How to get event listener method inheritance clarified

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 21 Sep 2009 08:41:01 +1000
To: "Christopher M. Balz" <christophermbalz@stanfordalumni.org>
Cc: www-dom@w3.org
Message-ID: <20090920224100.GA27198@wok.mcc.id.au>
Christopher M. Balz:
> Thank you for the reply! I agree - I don't know IDL but it looks like
> the spec enables this via the mixin prototype object in the 'Node'
> object diagram.


> Perhaps this could use some additional explanation
> (http://dev.w3.org/2006/webapi/WebIDL/#PrototypeRoot  and scroll down) -
> "Editorial note   Maybe the functions on mixin prototype objects
> should just call the relevant function on the original interface’s
> prototype object."
> Since interfaces don't have implementations of methods, what would the
> Editorial note's suggestion do?

The interface at the IDL level doesn’t have an implementation, but in
the ECMAScript environment there are implementations of these
interfaces.  The terminology used in the spec is that, for example,
Node.prototype is a reference to the “interface prototype object”.  So
the editorial note is suggesting that functions on a mixin prototype
object (like Node’s mixin prototype object’s addEventListener) simply
call the corresponding function on the original interface’s prototype
object (EventTarget.prototype.addEventListener).

Cameron McCormack ≝ http://mcc.id.au/
Received on Sunday, 20 September 2009 22:41:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:15 UTC