> window.setAlternativePrintHandler(somecanvasElement, callback); > Then define that so that right after beforeprint event the callback is > stored in a list which will be called during printing, regardless > whether the original canvas is in the document anymore.
The special print handler belongs to the canvas element. Therefore it should be defined directly on it I think. > Right now no, but that would be easy to add. Just add a member variable > to nsHTMLCanvasElement and make it point to the original element in > nsHTMLCanvasElement::CopyInnerTo Actually, we are not interested in anything more then keeping a reference to a JS function that was defined on the canvas for the print callback. A link to such a function could be created during the CopyInnerTo function call. Then we can be sure it's there when calling the function while printing, although the canvas element itself might got removed from the original document already. Does that make sense/is possible to implement? _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

