Fenster ist null
if (typeof window != 'undefined' && window.document &&
window.document.readyState == whatever) {
// do stuff
}
Faithful Fox
if (typeof window != 'undefined' && window.document &&
window.document.readyState == whatever) {
// do stuff
}