<div id="container"></div>
var node = document.getElementById('container');
for(var i = 0; i < 1000; i++) node.appendChild(document.createElement('div'));
var node = document.getElementById('container');
node.innerHTML = '';
var node = document.getElementById('container');
while(node.firstChild) node.removeChild(node.firstChild)
var node = document.getElementById('container');
while(node.firstChild) node.firstChild.remove()
var node = document.getElementById('container');
node.innerText = '';
var node = document.getElementById('container');
node.textContent = '';
var node = document.getElementById('container');
node.removeChildren()
--enable-precise-memory-info
flag.
Test case name | Result |
---|---|
innerHTML | |
removeChild | |
remove | |
innerText | |
textContent | |
removeChildren |
This benchmark does not have any results yet. Be the first one to run it!