2

How to do equivalent of the following pure JavaScript fragment with MooTools

x = document.createDocumentFragment();
x.[fill with nodes];
document.[somewhere].appendChild(x);

In particular as described in DOM 2 Core after attaching fragment to DOM the original variable x becomes empty DocumentFragment:

If it [the node to add] is a DocumentFragment object, the entire contents of the document fragment are moved into the child list of this node


Edit (2011-04-13 06:30 UTC):

What I'd like to get is something that behaves both as DocumentFragment from DOM 2 Core, but has all nice methods of Elements from MooTools Core.

Jakub Narębski
  • 309,089
  • 65
  • 217
  • 230

0 Answers0