I have the following html5 code:
followed by some javascript:
Firefox's drawImage function has poor performance
You might want to consider adding a setTimeout function in the onresize to prevent it from trying to redraw while the user is dragging the window to improve performance.