I have fixed the issue where setImmediate callbacks were not firing.

Explanation: When I finished the TypeScript port and fired up the unit tests, I discovered that our setImmediate polyfill, which uses window.sendMessage to quickly yield to the browser before resuming computation, would only receive a single test message. It appeared that our event listener was being unset.

Today, I ran the same unit tests in Firefox, and karma offered up a useful error message, pointing out that our tests were causing the *page to reload*.

(The confusing bit: If that were true, then *why* didn't the reload re-add our event listener? It successfully kept around the setImmediate function...)

I fired up Opera (Presto Opera, not Chromified Opera), which had a different error message: JSON.parse was failing. I fixed that bug, and now I'm in debug-land. It appears that only Opera is offering up useful error messages right now; Chrome currently beachballs and Firefox complains about the page reloading.

Moral of the story: Debug in ALL the browsers.

Time to head on down debug road.