Re: [webcomponents]: HTMLElementElement missing a primitive

But now XFancier carries a complete prototype, and there is no 'extends'
attribute, which is where I came in. This is my 'option 1'.

Are you suggesting this should be optional? This is why I wanted to bring
it up.

Scott


On Fri, Mar 8, 2013 at 1:03 PM, Erik Arvidsson <arv@chromium.org> wrote:

> Inline...
>
> On Fri, Mar 8, 2013 at 3:33 PM, Scott Miles <sjmiles@google.com> wrote:
>
>> imperative:
>>
>> class XFancier extends XFancy {
>>   fancify() {
>>      super();
>>      makeFancier();
>>   }
>> ...
>> document.register('x-fancier', XFancier);
>>
>> declarative:
>>
>> <element name='x-fancier' extends="x-fancy">
>> <script>
>>   class XFancier {
>>   fancify() {
>>      super(); // How do I get inherited fancify?
>>
>
> Yeah, this will not work. super is statically bound.
>
> Of course we could dynamically rebind super but not having an extends
> clause is really confusing.
>
> Why can't we just do?
>
> <element name="x-fancier">
> <script>
> class XFancier extends XFancy {
>    ...
> }
> </script>
> </element>
>
> --
> erik
>
>
>

Received on Friday, 8 March 2013 21:14:44 UTC