Message from JavaScript discussions

July 2017

— A DocumentFragment is the natural choice as it is speedy, but what is that? createRange()? Where does that exist in the DOM?

Message permanent page

— 

What I worry is that it is referred to by something somewhere in the DOM, making my template engine leak memory

— ?

— Well, if, say someone wants to delete their engine instance, I want to make sure the cached DocumentFragments are also deleted

Message permanent page

— I know about ranges from clipboard api

— I haven't used them before

— They're pretty easy to work with if I remember correctly

— Well, when creating a range like that, is it only returned or is there a range somewhere in the DOM?

— Furthermore does the range refer to the fragment?

— Hm, wait, maybe I am seeing it wrong. The range is returned I think.

— Ranges represent selections

— Selected text