document.all is a non-primitive object in the DOM that is falsy.
For example, this code doesn\'t do anything:
if (document.all) {
al
In short, it's to make BOTH of these code samples work. Browsers have to do this so that old web pages will continue to work.
// Internet Explorer
if (document.all) {
useActiveX()
}
// Netscape Navigator
else {
useOldButStillWorkingCode()
}
document.all.output.innerHTML = 'Hello, world!'