- From: Cameron McCormack <cam@mcc.id.au>
- Date: Sat, 2 Apr 2011 18:20:53 +1300
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- Cc: Lachlan Hunt <lachlan.hunt@lachy.id.au>, public-webapps <public-webapps@w3.org>
Lachlan Hunt: > >[Supplemental] > >interface Element { > >Element querySelector(in DOMString selectors, in optional any > >... > >} > > This adds another method to Element.prototype > > >[NoInterfaceObject] > >interface NodeSelector { > >Element querySelector(in DOMString selectors, in optional any > >... > >}; > >Element implements NodeSelector Boris Zbarsky: > This adds a new interface called NodeSelector and says that any > instance of Element must implement this interface. But it does not > add to Element.prototype; the method goes on the mixin prototype > object. See > http://www.w3.org/TR/WebIDL/#host-object-mixin-prototype Boris is right, that’s the difference, as it currently stands in Web IDL (forgetting for a moment that [Supplemental] isn’t defined). What I will do in the near future is implement the proposed changes to remove multiple inheritance from Web IDL and add the “mixin prototype” concept, which will allow you to specify the augment-an-existing-prototype behaviour that [Supplemental] would have given you. > [NoInterfaceObject] just means there is no window.NodeSelector. Yep. That’ll be the default for these mixin interfaces, too. -- Cameron McCormack ≝ http://mcc.id.au/
Received on Saturday, 2 April 2011 05:21:37 UTC