Created
November 20, 2012 03:51
-
-
Save ymkjp/4115836 to your computer and use it in GitHub Desktop.
Performance of DOM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fragment = document.createDocumentFragment(); | |
for (var i = 0; i < 10; i++) { | |
var child = document.createElement('div'); | |
// here | |
fragment.appendChild(child); | |
} | |
document.getElementById('parent').appendChild(fragment); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment