Lifecycle Callback Ordering in Trees

55 views
Skip to first unread message

Rob Eisenberg

unread,
May 1, 2014, 9:51:33 AM5/1/14
to polym...@googlegroups.com
Let's say I have the following html:

<my-element-one>
<my-element-two>
<my-element-three></my-element-three>
</my-element-two>
</my-element-one>

Now, let's say this was parsed into a DocumentFragment. Now, I then insert the fragment into the Document. What order will the attachedCallbacks of these custom element fire? Will they consistently fire depth first (three, two, one)? Or will they fire from top to bottom (one, two, three)? Or is it entirely undetermined? If I remove the entire tree later, what order will the detachedCallbacks fire?

Finally, is this behavior consistent between the pollyfill and the W3C spec's intended behavior? I've read through a bunch of the spec and haven't found a clear answer on this.

Eric Bidelman

unread,
May 1, 2014, 2:15:18 PM5/1/14
to Rob Eisenberg, polymer-dev


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/7af3feef-5be9-4daa-be4c-7e4f1850e901%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages