event-loop icon indicating copy to clipboard operation
event-loop copied to clipboard

Fixing microtasks and fleshing out raf

Open jakearchibald opened this issue 8 years ago • 3 comments

The diff is bad since I changed the indenting so it'd syntax highlight as JS.

Summary:

  • Changed executeMicrotasks to execute until the list is empty, including any additional items added.
  • Added executeJSCallback which should be called for all JS callbacks, including those from tasks, but there isn't really a way to express this.
  • Added executeRequestAnimationFrameCallbacks to show that additional callbacks queued will happen in the next turn around the render loop.

jakearchibald avatar Sep 26 '17 13:09 jakearchibald

I've split out the reindenting commit. The actual changes are at https://github.com/atotic/event-loop/pull/3/commits/9427d9b3f929d96aa9ca58e0d8031b7fdd3abf4f

jakearchibald avatar Sep 26 '17 13:09 jakearchibald

probably a tad easier to review without the whitespace changes: ?w=1

paulirish avatar Sep 26 '17 15:09 paulirish

TIL about ?w=1!

However, I split out the commits, so you can also see https://github.com/atotic/event-loop/commit/9427d9b3f929d96aa9ca58e0d8031b7fdd3abf4f.

jakearchibald avatar Sep 26 '17 16:09 jakearchibald