title: How to know when an SVG finished rendering?
body: <p>I'm trying to export a bunch of html pages that includes svg graphs to an image.
  I use React to render everything and html2canvas to convert the page, but the problem is that the graphs are rarely rendered. When I add a timeout after the render, it works fine. But I'm rendering lots of pages on after another. A fixed timeout may introduce unneccessary delays or (worse) prevent rendering of very complex svgs.</p>
  <p>I reckon this is due to the fact that the svgs DOM is loaded but overall has not finished rendering. Is there a way to detect when an svg or say a full html page has finished rendering completely? Since I'm using electron I'm ok with solutions that apply only to chrome, if available.</p>
  <p>I have seen <a href="https://stackoverflow.com/questions/10648693/how-can-i-tell-when-an-svg-is-finished-rendering">How can I tell when an SVG is finished rendering</a> but it's 9 years old and seems to be firefox specific.</p>