I have a script running that includes this statement:

if (!window.isLoaded) {
    window.addEventListener("load", function() {
    }, false);
The script works fine everywhere except in good old Internet Explorer. The IE error message points to the 'if' statement above.
I'm reading that IE does not play nice with addEventListener and needs to be adjusted with perhaps 'attachEvent' to accomodate IE.

I'm reading and tinkering but can't seem to get it sorted.
Does anyone have any idea how to get this to play nice with IE?
Thanks for any input!