This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22446 - [Custom]: Commentary about lifecycle callbacks queue being empty when document.register is invoked is incorrect
Summary: [Custom]: Commentary about lifecycle callbacks queue being empty when documen...
Status: RESOLVED DUPLICATE of bug 22459
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14968
  Show dependency treegraph
 
Reported: 2013-06-25 07:06 UTC by Dominic Cooney
Modified: 2013-06-25 20:48 UTC (History)
0 users

See Also:


Attachments

Description Dominic Cooney 2013-06-25 07:06:53 UTC
The spec has this informative language:

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

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

<script>
var A = document.register('x-a', ...);
// 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('x-b', ...);
</script>
Comment 1 Dimitri Glazkov 2013-06-25 17:05:03 UTC
(In reply to comment #0)
> The spec has this informative language:
> 
> "Also, because of when lifecycle callbacks are added to the lifecycle
> callbacks queue, the queue should be empty when document.register is
> invoked."
> 
> I don't think it is true; consider this case:
> 
> <script>
> var A = document.register('x-a', ...);
> // 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

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.
Comment 2 Dimitri Glazkov 2013-06-25 20:48:08 UTC

*** This bug has been marked as a duplicate of bug 22459 ***