Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

  • This WPT test may be referenced by the following Test IDs:
<!DOCTYPE html>
<title>document.all</title>
<link rel="author" title="Corey Farwell" href="mailto:coreyf@rwell.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function () {
assert_false(Boolean(document.all));
assert_true(document.all == undefined);
assert_true(document.all == null);
assert_false(document.all != undefined);
assert_false(document.all != null);
assert_true(document.all !== undefined);
assert_true(document.all !== null);
assert_false(document.all === undefined);
assert_false(document.all === null);
assert_equals(typeof document.all, "undefined");
if (document.all) { assert_true(false); }
if (!document.all) {}
else { assert_true(false); }
}, "'unusual behaviors' of document.all")
test(function() {
var all = document.all;
assert_false(Boolean(all));
assert_true(all == undefined);
assert_true(all == null);
assert_false(all != undefined);
assert_false(all != null);
assert_true(all !== undefined);
assert_true(all !== null);
assert_false(all === undefined);
assert_false(all === null);
assert_equals(typeof all, "undefined");
if (all) { assert_true(false); }
if (!all) {}
else { assert_true(false); }
}, "'unusual behaviors' of document.all with assignment")
</script>