开发者

Creating / wrapping DocumentFragment in MooTools JavaScript library

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜