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

Developer cannot call HTMLButtonElement. So whatever work it represents
that MUST be done by the browser.

Perhaps the browser doesn't call that exact function, but in any event,
neither does any user code.

Note that we are specifically taking about built ins, not custom
constructors.

S


On Thu, Feb 14, 2013 at 2:45 PM, Dimitri Glazkov <dglazkov@google.com>wrote:

> On Thu, Feb 14, 2013 at 2:40 PM, Scott Miles <sjmiles@google.com> wrote:
> > In all constructions the *actual* calling of HTMLButtonElement is done by
> > the browser.
>
> No, this is not correct. It's the exact opposite :)
>
> In this compromise proposal, the browser isn't calling any of the
> constructors. Arv pointed out that since the invention of [[Create]]
> override, we don't really need them anyway -- they never do anything
> useful for existing HTML elements.
>
> For your custom elements, I can totally see your library/framework
> having a convention of calling the super constructor.
>
> I did confuse matters but not putting in the invocation of the
> HTMLButtonElement.call.
>
> :DG<
>

Received on Thursday, 14 February 2013 22:48:23 UTC