Document Fragment - Add more context to code example

This commit is contained in:
2020-10-16 19:18:43 +05:30
parent ce031c7f50
commit c22c3f2e79
+1
View File
@@ -221,6 +221,7 @@ var fragment = document.createDocumentFragment()
// Insert / modify elements in fragment // Insert / modify elements in fragment
// in dom, <div class="outer"/> // in dom, <div class="outer"/>
var outerEle = document.querySelector(".outer")
outerEle.appendChild(fragment) outerEle.appendChild(fragment)
// This will remove all content from fragment and // This will remove all content from fragment and