Turns out you can use console.log in IE 9, but it only works in developer mode.
Fine, so the sensible thing in “not developer” mode would be for console.log to by turned into a NOP. This doesn’t seem to happen and random things were breaking until I commented out the console.log lines. It looks like trying to do anything with the console object throws an exception – not even
is allowed (no alert gets shown).
Just another one of those annoying “it’s works in the debug version” things, and everyone the world over has to build their own console.log wrappers.