This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The spec speaks to createElement, createElementNS, and tree construction during parsing. But DOM operations such as cloneNode, appendChild, adoptNode, etc. also create elements. Custom Elements should specify when lifecycle callbacks run in these cases. If they don't run (assumed, given the status quo) some commentary about which DOM operations *won't* trigger lifecycle events would be useful to guide implementations and authors.
I am probably reading this wrong, but don't we only create new elements in cloneNode? I don't think appendChild or adoptNode do that.
(In reply to comment #1) > I am probably reading this wrong, but don't we only create new elements in > cloneNode? I don't think appendChild or adoptNode do that. Ah... in legacy DOM appendChild may fall back to adoptNode if the node is in a different document, and adoptNode may fall back to doing importNode depending on implementations, and importNode creates an element. In DOM4 it looks like that adoptNode->importNode fallback does not exist. Great. But we need to handle cloneNode and importNode. In fact, DOM4 has a concept for "clone" <http://dom.spec.whatwg.org/#concept-node-clone>
Okay, then this is all bug 20488. *** This bug has been marked as a duplicate of bug 20488 ***