W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: document.register and ES6

From: Scott Miles <sjmiles@google.com>
Date: Wed, 6 Feb 2013 14:01:48 -0800
Message-ID: <CAHbmOLYs=WDr=0TcgtG019svkQkvYuD=oxrRDkQYjiwkK17-AQ@mail.gmail.com>
To: Daniel Buchner <daniel@mozilla.com>
Cc: Erik Arvidsson <arv@chromium.org>, Dimitri Glazkov <dglazkov@google.com>, public-webapps <public-webapps@w3.org>, Boris Zbarsky <bzbarsky@mit.edu>
Remember where we started: absurdly clean ES6 class syntax.

Requiring class definition class using property descriptors is a radical
march in the other direction.

I'm hardcore about syntactical tidiness. The reason I'm not freaking out
about defineProperties is IMO because I can avoid it when I don't need it
(which is about 99% of the time).

Scott

On Wed, Feb 6, 2013 at 1:50 PM, Daniel Buchner <daniel@mozilla.com> wrote:

> I just made sure it worked, and it does. As for developers freaking out, I
> really don't believe they would. If that was the case,
> Object.defineProperties should be causing a global pandemic of whopperdeveloper freakouts (
> http://www.youtube.com/watch?v=IhF6Kr4ITNQ).
>
> This would give us easy IE compat for the whole range of property types,
> and I'm willing to all but guarantee developers will have a bigger freakout
> about not having IE9 support than the prototype property of
> document.register taking both a baked and unbaked object.
>
> Daniel J. Buchner
> Product Manager, Developer Ecosystem
> Mozilla Corporation
>
>
> On Wed, Feb 6, 2013 at 1:34 PM, Scott Miles <sjmiles@google.com> wrote:
>
>> On Wed, Feb 6, 2013 at 1:27 PM, Daniel Buchner <daniel@mozilla.com>wrote:
>>
>>> So you're directly setting the user-added methods on matched elements in
>>> browsers that don't support proto, but what about accessors?
>>>
>>
>> I believe those can be forwarded too, I just didn't bother in my fiddle.
>>
>>
>>> Equipped with the unbaked prototype descriptor, in your upgrade phase,
>>> you should be able to simply bake the node with:
>>> Object.defineProperties(element, unbakedPrototypeDescriptor) - right?
>>>
>>
>> Yes, but I believe developers would freak out if we required them to
>> provide that type of descriptor (I would).
>>
>>  <snip>
>>
>
>
Received on Wednesday, 6 February 2013 22:02:17 GMT

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