Re: [webcomponents]: HTMLElementElement missing a primitive

2013-03-08 Thread Erik Arvidsson
On Fri, Mar 8, 2013 at 2:46 PM, Scott Miles wrote: > I also want to keep ES6 classes in mind. Presumably in declarative form I > declare my class as if it extends nothing. Will 'super' still work in that > case? > If you extend nothing (null) as in: class Foo extends null { m() { super();

Re: [webcomponents]: HTMLElementElement missing a primitive

2013-03-08 Thread Scott Miles
I also want to keep ES6 classes in mind. Presumably in declarative form I declare my class as if it extends nothing. Will 'super' still work in that case? Scott On Fri, Mar 8, 2013 at 11:40 AM, Scott Miles wrote: > Mostly it's cognitive dissonance. It will be easy to trip over the fact > that

Re: [webcomponents]: HTMLElementElement missing a primitive

2013-03-08 Thread Scott Miles
Mostly it's cognitive dissonance. It will be easy to trip over the fact that both things involve a user-supplied prototype, but they are required to be critically different objects. Also it's hard for me to justify why this difference should exist. If the idea is that element provides extra conven

Re: [webcomponents]: HTMLElementElement missing a primitive

2013-03-08 Thread Erik Arvidsson
If you have a tag name it is easy to get the prototype. var tmp = elementElement.ownerDocument.createElement(tagName); var prototype = Object.getPrototypeOf(tmp); On Fri, Mar 8, 2013 at 12:16 PM, Dimitri Glazkov wrote: > On Thu, Mar 7, 2013 at 2:35 PM, Scott Miles wrote: >> Currently, if I docu

Re: [webcomponents]: HTMLElementElement missing a primitive

2013-03-08 Thread Dimitri Glazkov
On Thu, Mar 7, 2013 at 2:35 PM, Scott Miles wrote: > Currently, if I document.register something, it's my job to supply a > complete prototype. > > For HTMLElementElement on the other hand, I supply a tag name to extend, and > the prototype containing the extensions, and the system works out the >

[webcomponents]: HTMLElementElement missing a primitive

2013-03-07 Thread Scott Miles
Currently, if I document.register something, it's my job to supply a complete prototype. For HTMLElementElement on the other hand, I supply a tag name to extend, and the prototype containing the extensions, and the system works out the complete prototype. However, this ability of HTMLElementEleme