[webkit-help] Copy a DOM Tree?

Sriram Neelakandan sriram.neelakandan at gmail.com
Wed Mar 21 00:24:24 PDT 2012


are you looking for
PassRefPtr<Node> Element::cloneNode(bool deep)




There is a JS API http://www.w3schools.com/dom/met_element_clonenode.asp
I guess this is what is used internally to implement the same.


2012/3/21 黄 轶明 <hoooooosety at gmail.com>

> hi,
>
> I wanna know it there anyway to copy a DOM Tree?
>
> After HTMLTreebuild build a dom tree, and in Document.cpp
> onLoadingFinished was called,
> I can get the body Element by the function body(). Can I get a copy of it
> using some function like:
>
> HTMLElement* deepcopy(HTMLElement* elem)
>
> Thank u very much!
>
> holsety huang
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>



-- 
Sriram Neelakandan
Author - Embedded Linux System Design And Development (
http://tinyurl.com/2doosu)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20120321/c25df29b/attachment.html>


More information about the webkit-help mailing list