IE Detection

JavaScript performance comparison

Test case created by Josh

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
   

};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Object Detection
var legacyIE = (document.all && !document.querySelector || document.all && document.querySelector && !document.addEventListener)? true  : false;

console.log(legacyIE);
pending…
HTML Conditional
function testLegacyIe()
    {
        var test = document.createElement('div');
        test.innerHTML = '<!--[if lte IE 8]>1<![endif]-->';

        var result = false;
        if ('1' === test.innerHTML) result = true;
        
        return(result);
    }

console.log(testLegacyIe());
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 Comments