Workaround update:
document.all !== undefined; >> true false
Since https://html.spec.whatwg.org/ requires that ...
The user agent must act as if the abstract equality comparison algorithm was used when returning the object returned for all, returns true compared to undefined and null values.
but since ...
(Comparison using the strict equality comparison algorithm and comparing abstract equality with other values, such as strings or objects, is not affected .)
using the Static Type Comparison Operator (for example: === |! == ) it is completely safe to check whether the HTMLAllCollection object can be used and / or present in the current UA client.
The Dynamic Type Comparison Operator will continue to return a false absence, as required by the specification.
document.all != undefined; >> false false
Workaround (older)
"all" in document; >> true false
A more complex approach when working with third-party code will be
delete document.all && "all" in document >> true false
source share