Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!