title: Convert Element or SVGSVGElement to string and keep mouseover, mouseout events
body: <p>I need to render svg element created by d3 and provide it to leaflet divIcon as html or string. Using outerHtml or XMLSerializer strips all events attached to svg so that is not solution. The thing is my code works perfectly when I provide svg generated by d3 to map and map shows pie as marker and events work but typescript is complaining, I usually solve this in leaflet with renderToStaticMarkup but this time it errors out with <code>Objects are not valid as a React child (found: [object SVGSVGElement])</code>. Logging svg gives me markup but it also containes data from d3 so it thinks it is object instead of html.</p>
  <p>Any idea how to render SVGSVGElement as html string and keep events attached to it?</p>