Я в настоящее время использую следующие условия, но они не работают в браузерах или вообще не работают:
if (typeof (window.innerHeight) == 'number') {
//Non-IE:
//Perform operation using window.innerWidth/Height
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
//IE 6+ in 'standards compliant mode'
//Perform operation using document.documentElement.clientWidth/Height
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
//IE 4 compatible
//Perform operation using document.body.clientWidth/Height
}
Я полагаю, что мне не хватает одного или двух условий - возможно, есть другое распространенное выражение, которое я не учел.
Что мне нужно добавить, чтобы завершить это?