[Bug 22966] New: [Custom]: Don't invoke callbacks while the createdCallback is running

https://www.w3.org/Bugs/Public/show_bug.cgi?id=22966

            Bug ID: 22966
           Summary: [Custom]: Don't invoke callbacks while the
                    createdCallback is running
    Classification: Unclassified
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
          Assignee: dglazkov@chromium.org
          Reporter: dominicc@chromium.org
        QA Contact: public-webapps-bugzilla@w3.org
            Blocks: 14968

The rationale is that the createdCallback is like a constructor and should run
to completion before callbacks start firing.

However the callbacks should still be queued (not dropped) while the
createdCallback is running, because that is past the point where the prototype
has been updated.

For example:

proto.createdCallback = function() {
  console.log('created start');
  this.remove();
  this.setAttribute('foo', 'bar');
  console.log('created end');
};
... (other callbacks which log) ...

should log

created start
created end
entered
left
attribute changed

Maybe the relationship between enqueuing a callback in a callback queue, and
moving the callback queue to the top-of-processing stack element queue needs to
change. Maybe the spec should model this with an explicit flag (
("created-callback-ran"). If the flag is not set when enqueuing a callback
(other than the created callback and the special-case first entered callback),
then the callback queue should not be moved to the top-of-processing-stack. (Of
course no callbacks are queued until the created callback has started running,
as usual.)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 15 August 2013 02:47:11 UTC