teste seletores

Benchmark created by Jerri Dick on


Preparation HTML

<button atr="1" atr2="1" class="s" id="main"></button>

Setup

var main = document.getElementById('main');
    var t;

Test runner

Ready to run.

Testing in
TestOps/sec
queryselector 1
t = main.getAttribute('id');
t = main.getAttribute('class');
t = main.getAttribute('atr');
t = main.getAttribute('atr2');
t = main.getAttribute('alerta');
ready
queryselectr2
var x = main.attributes;

t = x.id;
t = x.class;
t = x.atr;
t = x.atr2;
t = x.alerta;
ready

Revisions

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

  • Revision 1: published by Jerri Dick on