The getSVGDocument() method of the HTMLIFrameElement interface returns the Document object of the embedded SVG.
getSVGDocument()
HTMLIFrameElement
Document
None.
A Document.
const svgDoc = document.getElementById("el").getSVGDocument();
HTMLEmbedElement.getSVGDocument
HTMLObjectElement.getSVGDocument