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

[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 UTC