Re: [webcomponents]: Platonic form of custom elements declarative syntax

On Wed, Apr 10, 2013 at 11:14 PM, Allen Wirfs-Brock

> ECMAScript really has a very simply concept of 'this' out-side of a
> function.  It is a reference to the global object.  In all other cases
> 'this' occurs within a function body and is bound as part of a function
> innovation.  It would be a significant change to the ECMAScript semantics
> that are applied to 'this' the content of <script> tags.  I'm sure, it
> would only cause confusion.

We have at least three issues involved here:
  1) binding JS functions to component elements,
  2) scope of JS names declared within components,
  3) binding of |this| for JS functions declared/called within components.

I guess JS folks will be open to discuss and consider options for #1 and
#2; the issues are clear and the benefits tangible. Binding |this| is a
different story. We get burnt all the time by |this| issues and sorting out
the impact is much less clear. So despite Allen's "a very simple concept",
it's playing with fire.


Received on Thursday, 11 April 2013 15:03:07 UTC