Just calling cloneNode on the document? https://bugzilla.mozilla.org/show_bug.cgi?id=42976

Other than that, I think that's what I want.

-Eli

Jonas Sicking wrote:
Eli Friedman wrote:
What is the best way to go about making an exact clone of a document from C++? I'm getting a bit lost as to what I need to call to create a document with the same characteristics as the original. Do I need separate processing for HTML and XML? Are there any special kinds of documents I need to be aware of?

This is for use in layout/, so I can call internal APIs if needed.

The idea is that printing/print preview should have a copy of the document so that the document being used is owned by the printing code, cannot be changed by other documents, and can be modified by the printing code for its own purposes (i.e. for printing selection.)

Does calling CloneNode (on the nsIDOMNode interface) work? If not, it's probably a bug.

/ Jonas
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to