<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21825</bug_id>
          
          <creation_ts>2013-04-25 08:38:30 +0000</creation_ts>
          <short_desc>[Custom]: Specify or comment on node adoption--does element initialization happen?</short_desc>
          <delta_ts>2013-06-19 17:02:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>20488</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>14968</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dominic Cooney">dominicc</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>86771</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-04-25 08:38:30 +0000</bug_when>
    <thetext>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&apos;t run (assumed, given the status quo) some commentary about which DOM operations *won&apos;t* trigger lifecycle events would be useful to guide implementations and authors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88024</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-05-21 21:28:02 +0000</bug_when>
    <thetext>I am probably reading this wrong, but don&apos;t we only create new elements in cloneNode? I don&apos;t think appendChild or adoptNode do that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88888</commentid>
    <comment_count>2</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-06-07 04:34:51 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I am probably reading this wrong, but don&apos;t we only create new elements in
&gt; cloneNode? I don&apos;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-&gt;importNode fallback does not exist. Great. But we need to handle cloneNode and importNode. In fact, DOM4 has a concept for &quot;clone&quot;

&lt;http://dom.spec.whatwg.org/#concept-node-clone&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89590</commentid>
    <comment_count>3</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-06-19 17:02:48 +0000</bug_when>
    <thetext>Okay, then this is all bug 20488.

*** This bug has been marked as a duplicate of bug 20488 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>