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: Daniel Buchner <daniel@mozilla.com>
Date: Fri, 15 Feb 2013 08:42:55 -0800
Message-ID: <CAHZ6zJHBPMrx0QB5-H2YpavtTk-7HXEPyxkg0WzV0sYY9BnN=w@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Dimitri Glazkov <dglazkov@google.com>, public-webapps <public-webapps@w3.org>, Scott Miles <sjmiles@google.com>, Erik Arvidsson <arv@chromium.org>, Boris Zbarsky <bzbarsky@mit.edu>
I'm not sure I buy the idea that "two ways of doing the same thing does not
seem like a good approach" - the web platform's imperative and declarative
duality is, by nature, two-way. Having two methods or an option that takes
multiple input types is not an empirical negative, you may argue it is an
ugly pattern, but that is largely subjective.

Is this an accurate summary of what we're looking at for possible
solutions? If so, can we at least get a decision on whether or not _this_
route is acceptable?

FOO_CONSTRUCTOR = document.register(‘x-foo’, {
  lifecycle: {
     created: CALLBACK

FOO_CONSTRUCTOR = document.register(‘x-foo’, {
  constructor: FOO_CONSTRUCTOR

Daniel J. Buchner
Product Manager, Developer Ecosystem
Mozilla Corporation

On Fri, Feb 15, 2013 at 6:19 AM, Anne van Kesteren <annevk@annevk.nl> wrote:

> On Thu, Feb 14, 2013 at 9:48 PM, Dimitri Glazkov <dglazkov@google.com>
> wrote:
> > What do you think?
> It seems like this still requires "magic" for document.createElement()
> and document.createElementNS().
> Also, providing two ways of doing the same thing does not seem like a
> good approach to standardization and will come to haunt us in the
> future (in terms of maintenance, QA, new extensions to the platform,
> etc.).
> --
> http://annevankesteren.nl/
Received on Friday, 15 February 2013 16:43:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:58 UTC