Lets say the JavaScript scheduler has one item in its queue which will delete a div element. Earlier, we'd setup listeners for click events on this div element. The scheduler will schedule this deletion task as soon as its done with its current work (which could be anything). At this moment we click the soon-to-be-deleted-div and callbacks to this click's listeners are added to the queue.
I assume the schedule queue is fifo (am I right?), so the div will first be deleted and after the deletion the callbacks for the divs click listeners will be raised.
Have I captured the sequence of events correctly, or would deleting this element cause the click listener callbacks to be pulled from the queue?