On Thu, Feb 14, 2013 at 5:15 PM, Erik Arvidsson <a...@chromium.org> wrote:

> Yeah, this post does not really talk about syntax. It comes after a
> discussion how we could use ES6 class syntax.
>
> The ES6 classes have the same semantics as provided in this thread using
> ES5.
>
> On Thu, Feb 14, 2013 at 5:10 PM, Rick Waldron <waldron.r...@gmail.com>wrote:
>
>>
>> On Thu, Feb 14, 2013 at 4:48 PM, Dimitri Glazkov <dglaz...@google.com>wrote:
>>
>>>
>>> MyButton = document.register(‘x-button’, {
>>>   prototype: MyButton.prototype,
>>>   lifecycle: {
>>>      created: MyButton
>>>   }
>>> });
>>>
>>
>>
>> Does this actually mean that the second argument has a property called
>> "prototype" that itself has a special meaning?
>>
>
> This is just a dictionary.
>
>
>>
>> Is the re-assignment MyButton intentional? I see the original "MyButton"
>> reference as the value of the created property, but then
>> document.register's return value is assigned to the same identifier? Maybe
>> this was a typo?
>>
>>>
>>> document.register(‘x-button’, {
>>>  constructor: MyButton,
>>>  ...
>>> });
>>>
>>>
>> Same question as above, but re: "constructor"?
>>
>>
> Same answer here.
>
> I'm not happy with these names but I can't think of anything better.
>

Fair enough, I trust your judgement here. Thanks for the follow up—always
appreciated.

Rick

>
> --
> erik
>
>

Reply via email to