Clone canvas to p5 creategraphics()

Is there a way to clone the entire p5 canvas to creategraphics? I’m trying to render a SVG using the p5.js-svg library, but I don’t want to set the entire canvas renderer to “SVG”, because I only need the output to happen at set intervals, and it takes a lot of power to write objects to both a pgraphics object and the canvas concurrently. Is there a way of somehow copying the canvas and then sending this over to a creategraphics object? I stumbled upon this, but don’t quite understand how it is implemented, it looks like it is modifying the p5 source:

https://discourse.processing.org/t/creategraphics-referencing-existing-canvas-context/21067/3

forum.Processing.org/two/discussion/22039/using-creategraphics-get-in-the-draw-loop-causing-memory-usage#Item_4

This is super cool. What I’m trying to do is save as a SVG though, not as an image.
I will use this for some other project.