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

On 3/6/13 5:05 PM, Dimitri Glazkov wrote:
> * attributeChangedCallback -- synchronously called when an attribute
> of an element is added, removed, or modified

Synchronously in what sense?  Why are mutation observers not sufficient 

> * insertedCallback -- asynchronously called when an element is added
> to document tree (TBD: is this called when parser is constructing the
> tree?)

Again, why is this not doable with mutation observers?

> * removedCallback -- asynchronously called when an element is removed
> from the document tree (except the situations when the document is
> destroyed)

And this?

 > Anything looks obviously wrong/dangerous/crazy/exciting?

The "synchronously" bit of attributeChangedCallback is ringing alarm 
bells for me for sure.


Received on Thursday, 7 March 2013 02:34:19 UTC