This may be a bug in internet explorer (IE9), wondering if it is known or there is a workaround.
It can be reproduced by opening up the dev console, and executing each of these commands,
window.onresize = function() { alert("onresize"); }
At this point, when you resize the window, the event fires as expected. Now execute,
document.write("test");
After this point window.resize
will be null.
That's probably expected since document.write
calls document.open
which clears everything.
However, even if you add back an event handler, it will never fire,
window.onresize = function() { alert("onresize"); }