Edit: It\'s not a duplicate of \"Fastest DOM insertion\" because it includes the event listeners variable too. Anyway I will edit the question.
I wo
Google/SO are your friends:
For example for question 1/2 , see Fastest DOM insertion
I think, you can search for a lot of them.
Another good place to search for performance comparison beside google/SO is to use jsperf: http://jsperf.com/browse and http://jsperf.com/popular. I'm pretty sure there are response to a lot of your question there. And if you have some questions that are unanswered, you can test them as well in the main page http://jsperf.com/.
1 Set the value of innerHTML
on the parent element to a string containing HTML for the new elements.
2 Same as 1.
4 Set the value of innerHTML
on the parent element to an empty string.
7.1 Call Node.removeChild()
, save the returned Node object, and then pass the node to Node.appendChild()
.