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

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 <> wrote:

> On Thu, Feb 14, 2013 at 9:48 PM, Dimitri Glazkov <>
> 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.).
> --

Received on Friday, 15 February 2013 16:43:58 UTC