V4 Popup on SVG element

Is there any way to anchor a popup to an element in an embedded SVG such as a path or rect element?

The anchor option can take a string with the id of the element it is “anchored to”. If you assign an id to the rect inside the svg, that same id should work for the popup.

  anchor: '#myRecID',

Then in your svg:

  <rect id="myRecID" x="10" y="10" width="100" height="50" />