In a function I create often DocumentFragment-object, therefore I like to remove it after the process is finish. DocumentFragment has no parent, therefore I can't use e.g.:
node.parentNode.removeChild(node);
Or e.g. using jQuery as follows:
var oDocFrag = document.createDocumentFragment();
alert($(oDocFrag).length); // shows 1
$(oDocFrag).remove();
alert($(oDocFrag).length); // still shows 1
Any idea how can I remove a created DocumentFragment-object? Thanks in advance.