blob: 619796c303239a7706e3820b9eb055c956e99ddc [file] [log] [blame]
description("typeof document.all is never 'function'");
const documentAll = document.all;
function testTypeofIsFunction() {
let acc = 0;
for (let i = 0; i < 1e6; ++i)
acc += (typeof documentAll === "function");
return acc === 1e6;
}
function testTypeofIsNotFunction() {
let acc = 0;
for (let i = 0; i < 1e6; ++i)
acc += (typeof documentAll !== "function");
return acc === 1e6;
}
shouldBeFalse("testTypeofIsFunction()");
shouldBeTrue("testTypeofIsNotFunction()");