[RequestAnimationFrame]: thrown exceptions and user experience

When implementing / contributing to a requestAnimationFrame polyfill I
found this part of the specification.

> If calling the operation resulted in an exception being thrown, then
catch that exception and ignore it.

The way I use `requestAnimationFrame` is to invoke my rendering engine
every frame. (specifically it's a React-like virtual-dom rendering engine).

I spend a few hours debugging why there was a rendering artifact on my web
page and released there was a bug in my rendering engine that was being
swallowed by the `requestAnimationFrame` polyfill I was using.

My first gut reaction was to remove the painpoint that hid a useful
exception from my code ( https://github.com/chrisdickinson/raf/pull/20 ).

It seems incredibly unintuitive for a core timing primitive to swallow and
ignore exceptions, this makes debugging incredibly difficult and painful.

For reference point, reading the `setTimeout` specification (
Received on Monday, 23 June 2014 17:22:47 UTC

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant