<?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>22446</bug_id>
          
          <creation_ts>2013-06-25 07:06:53 +0000</creation_ts>
          <short_desc>[Custom]: Commentary about lifecycle callbacks queue being empty when document.register is invoked is incorrect</short_desc>
          <delta_ts>2013-06-25 20:48:08 +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>22459</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>89787</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-06-25 07:06:53 +0000</bug_when>
    <thetext>The spec has this informative language:

&quot;Also, because of when lifecycle callbacks are added to the lifecycle callbacks queue, the queue should be empty when document.register is invoked.&quot;

I don&apos;t think it is true; consider this case:

&lt;script&gt;
var A = document.register(&apos;x-a&apos;, ...);
// callbacks have been exhaustively invoked by register() at this point
var x = new A();
// ready has been eagerly invoked by the constructor at this point
document.body.appendChild(x);
// inserted(x) is queued at this point
// queue is NOT empty
document.register(&apos;x-b&apos;, ...);
&lt;/script&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89823</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-06-25 17:05:03 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; The spec has this informative language:
&gt; 
&gt; &quot;Also, because of when lifecycle callbacks are added to the lifecycle
&gt; callbacks queue, the queue should be empty when document.register is
&gt; invoked.&quot;
&gt; 
&gt; I don&apos;t think it is true; consider this case:
&gt; 
&gt; &lt;script&gt;
&gt; var A = document.register(&apos;x-a&apos;, ...);
&gt; // callbacks have been exhaustively invoked by register() at this point
&gt; var x = new A();
&gt; // ready has been eagerly invoked by the constructor at this point
&gt; document.body.appendChild(x);
&gt; // inserted(x) is queued at this point
&gt; // queue is NOT empty

The thing is, this is where developer will expect the inserted to fire. We need to figure out what this means from spect/impl perspective.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89849</commentid>
    <comment_count>2</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-06-25 20:48:08 +0000</bug_when>
    <thetext>

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

    </bug>

</bugzilla>