Test for window.onload never fires if page contains an