Record and replay html5 canvas events.