Back to Content

HTMLEmbedElement: getSVGDocument() method

files/en-us/web/api/htmlembedelement/getsvgdocument/index.md

latest560 B
Original Source

{{APIRef("HTML DOM")}}

The getSVGDocument() method of the {{domxref("HTMLEmbedElement")}} interface returns the {{domxref("Document")}} object of the embedded SVG.

Syntax

js-nolint
getSVGDocument()

Parameters

None.

Return value

A {{domxref("Document")}}.

Examples

js
const svg = document.getElementById("el").getSVGDocument();

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("HTMLIFrameElement.getSVGDocument")}}
  • {{domxref("HTMLObjectElement.getSVGDocument")}}