Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

176
Vistas
Why is document.all 'false'?

So I was playing around with document in JavaScript, as an alternate way of using document.getElementById. But why does document.all equal null? I ran a few commands to prove it's even more 'falsy'.

document.all // HTMLAllCollection[1276]
document.all[0] // <html>...</html>

typeof document.all // 'undefined'
!{} // false. works correctly
!document.all // true! WTF

What is this? Other objects work fine. What happened to the document.all object? Is it broken?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

document.all is a non-standard API introduced by IE. It is not considered good practise to use.

For compatibility with websites that depend on it, some other browsers have introduced support for it.

Some websites that use it depend on testing for the presence of document.all to determine if the browser is IE and uses that to assume that the browser has a bunch of bugs and other non-standard APIs provided by IE.

Browsers which added support for compatibility purposes return a falsy value so that they don't get mistakenly identified as IE (and get passed other code which won't work on them).

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda