Rob, thanks a lot for your step points on how to get this implemented - this is way more detailed then I've expected it to be :)
> For each one, look up the original > canvas, see if it has an "onprint" (or whatever we call it) event handler > set on it. For those that do: If we use events here, there could be two callbacks listening for the same event. To keep it easy, I propose to define a new `printCallback` attribute on the nsHTMLCanvasElement, that takes a JSFunction as argument. Are there advantages in using an event instead of a simple callback that I don't realize? > -- Synchronously dispatch the "print" event to the original canvas. > -- That event should use a custom DOM event class (see for example > nsDOMNotifyPaintEvent) with an extra field that's the 2D rendering context > for the printed nsHTMLCanvasElement With the idea of the `printCallback` from above, the first argument would be the new created RenderingContext. _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

