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: Wed, 20 Feb 2013 10:48:50 -0800
Message-ID: <CAHbmOLZSoowV0BevgN86B7=c5Y-uAtUBKkg862viAp6FP805xQ@mail.gmail.com>
To: Dimitri Glazkov <dglazkov@google.com>
Cc: Daniel Buchner <daniel@mozilla.com>, Anne van Kesteren <annevk@annevk.nl>, Boris Zbarsky <bzbarsky@mit.edu>, Erik Arvidsson <arv@chromium.org>, public-webapps <public-webapps@w3.org>
[I messed up and failed to reply-all a few messages back, see the quoted
text to pick up context]

>> semantic is only important in markup

Hrm, ok. I'll have to think about that.

At any rate, I'm concerned that developers will not be able to predict what
kind of node they will get from a constructor. We had a rule that you get
one kind of node for 'custom' elements and another for extensions of known
elements. But now it's more complicated.

Scott

On Wed, Feb 20, 2013 at 10:39 AM, Dimitri Glazkov <dglazkov@google.com>wrote:

> On Wed, Feb 20, 2013 at 10:34 AM, Scott Miles <sjmiles@google.com> wrote:
> > var FancyHeader = document.register('fancy-header', {prototype:
> > FancyHeaderPrototype});
> > document.appendChild(new FancyHeader());
> >
> > what I expect in my document:
> >
> > <!-- better have localName 'header', because I specifically want to
> > communicate that semantic -->
> > <header is="fancy-header">
>
> But.... semantic is only important in markup? If you're building this
> imperatively, there's really no semantics anymore. You're in a DOM
> tree.
>
> Now, a valid question would be: what if I wanted to serialize this DOM
> tree in a certain way? I don't have an answer to that.
>
> :DG<
>
Received on Wednesday, 20 February 2013 18:49:18 GMT

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