A few people were curious about the scheduling of requestAnimationFrame callbacks, so here’s the tl;dr:

Any rAFs queued in your event handlers will be executed in the ​same frame​.
Any rAFs queued in a rAF will be executed in the next frame. (Same for any queued within IntersectionObserver or ResizeObserver callbacks.)

All rAFs that are queued will be executed in the intended frame.

rAFs aren’t throttled for you if they take too long to execute.

Let’s say there’s 5 callbacks queued up, and they’ll each take ~100 ms. The browser will not distribute them amongst many frames. It’ll try to…


Support for Node.js debuggability landed in Node.js in 2016. Here’s how to get up and running. (Post updated Jan 2018)

1. Download and install the current version of node. (v6.3.0+ required)

2. Run node with the --inspect flag:

node --inspect index.js
# Break on the first statement of the script with --inspect-brknode --inspect-brk index.js

(In Node 6, you have to use --inspect --debug-brk for this inspect & pseudo-breakpoint combo.)

Next, you used to open the big chrome-devtools:// URL it spits out, but don’t. Now there’s a better way…

3. Open about:inspect in Chrome

It’ll redirect you to…

Paul Irish

The web, performance, and tooling. Also ❤z.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store