Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
div vs textarea
(version: 0)
Comparing performance of:
innerHTML vs innerText vs textContent vs valueA vs valueB
Created:
4 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<div id='div' style='background:#faebd7;grid-area:console;width:100%;height:76px;resize:none;overflow:auto;font-family:monospace;-webkit-writing-mode:horizontal-tb!important;text-rendering:auto;color:-internal-light-dark(black,#fff);letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-shadow:none;display:inline-block;text-align:start;appearance:auto;background-color:-internal-light-dark(#fff,#3b3b3b);flex-direction:column;cursor:text;white-space:pre-wrap;overflow-wrap:break-word;column-count:initial!important;margin:0;font:400 13.3333px monospace;border-width:1px;border-style:solid;border-color:-internal-light-dark(#767676,#858585);border-image:initial;padding:2px'></div> <textarea id='textarea' style='background:#faebd7;grid-area:console;width:100%;height:76px;resize:none;overflow:auto;font-family:monospace;-webkit-writing-mode:horizontal-tb!important;text-rendering:auto;color:-internal-light-dark(black,#fff);letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-shadow:none;display:inline-block;text-align:start;appearance:auto;background-color:-internal-light-dark(#fff,#3b3b3b);flex-direction:column;cursor:text;white-space:pre-wrap;overflow-wrap:break-word;column-count:initial!important;margin:0;font:400 13.3333px monospace;border-width:1px;border-style:solid;border-color:-internal-light-dark(#767676,#858585);border-image:initial;padding:2px'></textarea>
Script Preparation code:
document.getElementById("div").innerHTML=""; document.getElementById("textarea").value="";
Tests:
innerHTML
document.getElementById("div").innerHTML+="abcdefghijk";
innerText
document.getElementById("div").innerText+="abcdefghijk";
textContent
document.getElementById("div").textContent+="abcdefghijk";
valueA
document.getElementById("textarea").value+="abcdefghijk";
valueB
document.getElementById("textarea").value+="abcdefghijk";
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (5)
Previous results
Fork
Test case name
Result
innerHTML
innerText
textContent
valueA
valueB
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
test DomParser test
Updating innerHTML
DIV.innerHTML vs TEXTAREA.value
textContent vs innerHTML vs innerText
Comments
Confirm delete:
Do you really want to delete benchmark?