- Notifications
You must be signed in to change notification settings - Fork 22.7k
/
Copy pathindex.md
40 lines (26 loc) · 764 Bytes
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
title: "HTMLObjectElement: getSVGDocument() method"
short-title: getSVGDocument()
slug: Web/API/HTMLObjectElement/getSVGDocument
page-type: web-api-instance-method
browser-compat: api.HTMLObjectElement.getSVGDocument
---
{{APIRef("HTML DOM")}}
The **`getSVGDocument()`** method of the {{domxref("HTMLObjectElement")}} interface returns the {{domxref("Document")}} object of the embedded SVG.
## Syntax
```js-nolint
getSVGDocument()
```
### Return value
A {{domxref("Document")}}.
## Examples
```js
constsvg=document.getElementById("el").getSVGDocument();
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{domxref("HTMLIFrameElement.getSVGDocument")}}
- {{domxref("HTMLEmbedElement.getSVGDocument")}}