On Tue, Aug 30, 2011 at 22:33, Dominic Cooney <dominicc@chromium.org> wrote: > You will notice that this says nothing about how prototypes are wired > up. It should. Maybe the argument to extend should have an optional > second field, proto, that specifies the new methods/getters/setters > that ContactPicker's prototype should introduce. > > This is not a general subtyping mechanism! It is only designed for > setting up subtypes of HTMLElement for use with register. When > ECMAScript and the DOM bindings are sufficiently aligned, > HTMLElement.register can be opened up to accept constructors defined > using ordinary ECMAScript mechanisms for subtyping DOM interfaces. > Scripts can continue to use extend (it is pretty succinct) or > constructors set up their own way. Providing a prototype is important. For example I can imagine UI toolkits providing their own "base class" that all the custom elements extend. Also, it seems essential to allow extending other things than just HTMLElement. -- erikReceived on Wednesday, 31 August 2011 20:39:21 GMT
This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT