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

Re: Custom elements ES6/ES5 syntax compromise, was: document.register and ES6

From: Scott Miles <sjmiles@google.com>
Date: Thu, 14 Feb 2013 14:53:48 -0800
Message-ID: <CAHbmOLYsBEkPhKvGE6QK0meO5RXU3qe8wR0XgD4-Zgb_c=TaYQ@mail.gmail.com>
To: Dimitri Glazkov <dglazkov@google.com>
Cc: Rick Waldron <waldron.rick@gmail.com>, Erik Arvidsson <arv@chromium.org>, public-webapps <public-webapps@w3.org>, Daniel Buchner <daniel@mozilla.com>, Boris Zbarsky <bzbarsky@mit.edu>, Anne van Kesteren <annevk@annevk.nl>
On Thu, Feb 14, 2013 at 2:48 PM, Dimitri Glazkov <dglazkov@google.com>wrote:

> On Thu, Feb 14, 2013 at 2:23 PM, Scott Miles <sjmiles@google.com> wrote:
> > MyButton = document.register(‘x-button’, {
> >   prototype: MyButton.prototype,
> >   lifecycle: {
> >      created: MyButton
> >   }
> > });
> >
> > What's the benefit of allowing this syntax? I don't immediately see why
> you
> > couldn't just do it the other way.
>
> Daniel answered the direct question, I think,


I must have missed that.


> but let me see if I
> understand the question hiding behind your question :)
>
> Why can't we just have one API, since these two are so close already?
> In other words, can we not just use "constructor" API and return a
> generated constructor?
>
> Do I get a cookie? :)
>
> :DG<
>

Well, yes, here ya go: (o). But I must be missing something. You wouldn't
propose two APIs if they were equivalent, and I don't see how these are not
(in any meaningful way).
Received on Thursday, 14 February 2013 22:54:16 GMT

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