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

Re: document.register and ES6

From: Dimitri Glazkov <dglazkov@google.com>
Date: Wed, 6 Feb 2013 10:32:19 -0800
Message-ID: <CADh5Ky3YemxipkTdXw3u1ELCRSB_BEvjeGR0CA3yHqyU+ku8fQ@mail.gmail.com>
To: Erik Arvidsson <arv@chromium.org>
Cc: Scott Miles <sjmiles@google.com>, Alex Russell <slightlyoff@google.com>, Daniel Buchner <daniel@mozilla.com>, public-webapps <public-webapps@w3.org>, Boris Zbarsky <bzbarsky@mit.edu>
On Wed, Feb 6, 2013 at 9:56 AM, Erik Arvidsson <arv@chromium.org> wrote:

> On Wed, Feb 6, 2013 at 12:47 PM, Scott Miles <sjmiles@google.com> wrote:
> >>> Instead of passing in functions to document.register we can call
> methods
> >>> on the custom element.
> >
> > My understanding is that the 'passing in functions' was a design
> decision,
> > not a technical one. IOW, Dimitri spec'd it that way so these (private)
> > lifecycle methods aren't just sitting there on the node's public API.
> >
> > This technique certainly on the table to change, but I think it's
> improper
> > to deem it technical debt.
>
> Good point about allowing these to be non public members of the element.
>
> With that in mind maybe we should reconsider to go back to the
> property bag even though it is a lot more verbose.
>

+1. I think property bag is back. We can change as little as:

document.register("foo-bar", { propertyNameTBD: FooBar, ... });
// that is, the only change from current spec is replacing "prototype"
property
// with some other property that holds the class

or as much as:

document.register("foo-bar", FooBar, { /* property bag is a 3rd param */ });

:DG<
Received on Wednesday, 6 February 2013 18:32:47 GMT

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