Dean Edwards wrote: > Matthew Raymond wrote: >>| if (documentchanged) { >>| printClone = document.clone(); >>| prepareForPrinting(printClone); >>| } >>| >>| printClone.print(); > > This seems less practical than print events.
I don't see how: | OnBeforePrintEventFunction() { | prepareForPrinting(document); | } | | OnAfterPrintEventFunction() { | restoreForScreen(document); | } With my method, you don't have to worry about restoring anything, because you can just get rid of the clone once you're done printing. > It is also very difficult to detect changes to the document. Perhaps. Depends on the application. > What do you mean by changes? Style > changes? New/removed content? > > I quite like the idea of a DOMModified event. Does this exist? Can we > have it please? I think the DOM spec already has events that fire when you alter the DOM. Here's some DOM notes I took regarding unimplemented DOM stuff in Mozilla... | DOM2 | - Events for interface MutationEvent | -- DOMSubtreeModified | -- DOMNodeRemovedFromDocument | -- DOMNodeInsertedIntoDocument I don't think IE supports that either, or Opera for that matter.