innerText vs textContent (v2)

Revision 2 of this benchmark created on


Preparation HTML

<span id="foo">Bar</span>

Setup

var span = document.getElementById('foo');

Test runner

Ready to run.

Testing in
TestOps/sec
innerText
span.innerText = 'Baz';
ready
textContent
span.textContent = 'Baz';
ready

Revisions

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