Here's an example of the proposal - which to be clear, does not require the
rebinding of 'this' in the <script> tag - showing the various developer
options in action: https://gist.github.com/csuwldcat/5380969 - all three
options included in the example are valid, leaving the choice to the
developer as to which they prefer.
Pros:
- No 'this' rebinding required
- Retains ability to use a <script>, which is the most ergonomic way to
allow for components that need to set global delegates and adjust their
definitions to meet the needs of the environment.
- Allows for ES6 to be an opt-in convenience for use-cases that benefit
from it.
- Decouples ES6 from the declarative custom element syntax so
implementers are not forced to implement ES6 or lose the ability to offer
extension of existing elements.
Cons:
- Requires generating constructors - which matches today's common
element constructor paradigm.
On Sat, Apr 13, 2013 at 6:13 PM, Brian Kardell <bkardell@gmail.com> wrote:
>
> On Apr 13, 2013 8:57 PM, "Daniel Buchner" <daniel@mozilla.com> wrote:
> >
> > @Rick - if we generated a constructor that was in scope when the script
> was executed, there is no need for rebinding 'this'. I'd gladly ditch the
> rebinding in favor of sane, default, generated constructors.
>
> I think we need someone to summarize where we are at this point :)
>
> Is anyone besides scott in favor of the
>
> 2) Invent a new element specifically for the purpose of defining prototypes
>
> For the record, i am not.
>