This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
These will be mapped exactly to inserted/removed hooks in DOM core: * http://dom.spec.whatwg.org/#node-is-inserted * http://dom.spec.whatwg.org/#node-is-removed Based on discussion in bug 24314, we could even deprecate attached/detached callback in their favor.
It's definitely appealing to expose DOM core with high fidelity, but we have some performance realities that concern me. In particular, calling back into JS from the native side is known to expensive (at least on some platforms). The currently spec'd callback is only called when an element's subtree is attached or detached form the main document, which is a much lower frequency situation. This is less powerful, but it is perhaps a good tradeoff to avoid killing custom elements with expensive callbacks?
Note that the callbacks in DOM need to be updated to take several arguments to provide context for what actually happened. I haven't attempted that rewrite yet.
Moved to https://github.com/w3c/webcomponents/issues/222