3 ms·
Here are some benchmarks: http://jsperf.com/dom-vs-innerhtml/18 http://jsperf.com/dom-vs-innerhtml/18 TLDR: It depends, but DOM manipulation tends to be faster
by jacobr 14y ago
Here are some benchmarks: http://jsperf.com/dom-vs-innerhtml/18 http://jsperf.com/dom-vs-innerhtml/18
TLDR: It depends, but DOM manipulation tends to be faster in newer browsers.