W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: [webcomponents]: HTMLElementElement missing a primitive

From: Erik Arvidsson <arv@chromium.org>
Date: Fri, 8 Mar 2013 16:03:49 -0500
Message-ID: <CAJ8+GoiMy-DOXNUNxSgKaY8st8jX4QTqX6guZkTUTuw20a9GSQ@mail.gmail.com>
To: Scott Miles <sjmiles@google.com>
Cc: Dimitri Glazkov <dglazkov@chromium.org>, public-webapps <public-webapps@w3.org>
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:05:03 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:58 GMT