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

Re: [webcomponents]: Moving custom element callbacks to prototype/instance

From: Hajime Morrita <morrita@google.com>
Date: Thu, 7 Mar 2013 09:03:57 +0900
Message-ID: <CALzNm5oWwq73bLjcN8VCEsqTaaDmO9yHj4bFP2E5A7P4BNyE7Q@mail.gmail.com>
To: Dimitri Glazkov <dglazkov@google.com>
Cc: Scott Miles <sjmiles@google.com>, public-webapps <public-webapps@w3.org>, Elliott Sprehn <esprehn@google.com>, Steve Orvell <sorvell@google.com>, Daniel Buchner <daniel@mozilla.com>, Adam Klein <adamk@google.com>, Blake Kaplan <mrbkap@mozilla.com>, William Chen <wchen@mozilla.com>
>From an implementors perspective:

Putting such callbacks on the prototype object means that it can be
changed, or even can be added after the element registration. This is
different from a function parameter, which we can consider as a snapshot.

One consequence is that it will become harder to cache (including negative
cache) these values. We need to traverse the prototype chain in C++, which
is typically slower than doing it in JS, on every lifecycle event. Or we
need to invent something cool to make it fast.




On Thu, Mar 7, 2013 at 7:29 AM, Dimitri Glazkov <dglazkov@google.com> wrote:

> On Wed, Mar 6, 2013 at 2:20 PM, Scott Miles <sjmiles@google.com> wrote:
>
> > That's the ultimate goal IMO, and when I channel Alex Russell (without
> > permission). =P
>
> Don't we already have Fake Alex for that (
> https://twitter.com/FakeAlexRussell)?
>
> :DG<
>



-- 
morrita
Received on Thursday, 7 March 2013 00:04:25 GMT

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