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

Re: [webcomponents]: What callbacks do custom elements need?

From: Elliott Sprehn <esprehn@gmail.com>
Date: Wed, 6 Mar 2013 14:12:54 -0800
Message-ID: <CAPJYB1gghoOT4_vn0Fzmu_wgS1f-r4R0ZbSEZVM=t51_Ay+uKw@mail.gmail.com>
To: Dimitri Glazkov <dglazkov@google.com>
Cc: public-webapps <public-webapps@w3.org>, Daniel Buchner <daniel@mozilla.com>, William Chen <wchen@mozilla.com>, Blake Kaplan <mrbkap@mozilla.com>, Scott Miles <sjmiles@google.com>, Elliott Sprehn <esprehn@google.com>, Steve Orvell <sorvell@google.com>, Hajime Morrita <morrita@google.com>
On Wed, Mar 6, 2013 at 2:05 PM, Dimitri Glazkov <dglazkov@google.com> wrote:

> ...
> * insertedCallback -- asynchronously called when an element is added
> to document tree (TBD: is this called when parser is constructing the
> tree?)
> * removedCallback -- asynchronously called when an element is removed
> from the document tree (except the situations when the document is
> destroyed)

The inserted and removed callbacks need to happen in
batches asynchronously, specifically if I have a tree:

   / \
 C   D

And B and D are custom elements and then I remove A, the remove should
happen first and then B and D should be notified after the removal and all
clean up has happened. We don't want to reinvent mutation events here.

insertedCallback should happen the same way. We should fully construct the
tree first and then all of them get called in a big batch at the end.

- E
Received on Wednesday, 6 March 2013 22:14:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:58 UTC