[Bug 22459] [Custom]: Consider explicitly emptying callback queue in more cases

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

Elliott Sprehn <esprehn@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |esprehn@gmail.com

--- Comment #23 from Elliott Sprehn <esprehn@gmail.com> ---
(In reply to comment #19)
> (In reply to comment #18)
> > `createdCallback` is special, since it's our only chance to be
> > constructor-like.
> 
> And enteredDocument and leftDocument callback are also special; my
> understanding was that you wanted these in matched pairs. Consider this
> modified example:
> 
> Assume x-a, x-b and x-c:
> - x-a has an enteredDocument callback that grabs x-b removes it
> - x-b have enteredDocument, leftDocument callbacks which log
> 
> Given:
> 
> ...
> 
> Did I get that right?

No, callback execution always resumes from where it left off in the queue. You
can never have a leftDocument before the associated enteredDocument(), but you
_can_ have an enteredDocument() at a point where you're no longer in the
document, or a leftDocument() where you're already back in the document.

All operations just push more callbacks to run. When you exit a method like
innerHTML() you start running all callbacks from the oldest to the newest. If
any callback adds more callbacks they just end up at the end of the line.

Your logging output doesn't match the discussion for how this works.

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

Received on Tuesday, 9 July 2013 03:25:21 UTC