Document Fragment - call it off-screen instead of off-canvas

This commit is contained in:
2020-10-16 19:25:19 +05:30
parent c22c3f2e79
commit ad594a2019
+1 -1
View File
@@ -202,7 +202,7 @@ parent.insertBefore(newEle, ref.nextSibling)
### 6. Document Fragment ### 6. Document Fragment
DocumentFragment can be considered to be a off-canvas lightweight `document` object. DocumentFragment can be considered to be a off-screen lightweight `document` object.
It is generally used for batching multiple operations - by doing them over time in the fragment and rendering it in one shot to the actual visible DOM. It is generally used for batching multiple operations - by doing them over time in the fragment and rendering it in one shot to the actual visible DOM.
Because fragment is not rendered, making changes to it doesn't cause any performance impact (no reflow). Because fragment is not rendered, making changes to it doesn't cause any performance impact (no reflow).