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
▸ node --inspect index.js
# Break on the first statement of the script with --inspect-brk▸ node --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…
about:inspect in Chrome
It’ll redirect you to…