Skip to content

Commit

Permalink
New pages: getSVGDocument() method pages (#36986)
Browse files Browse the repository at this point in the history
  • Loading branch information
estelle authored Nov 28, 2024
1 parent 0bf15d0 commit f5af74a
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 1 deletion.
34 changes: 34 additions & 0 deletions files/en-us/web/api/htmliframeelement/getsvgdocument/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "HTMLIframeElement: getSVGDocument() method"
short-title: getSVGDocument
slug: Web/API/HTMLIframeElement/getSVGDocument
page-type: web-api-instance-method
browser-compat: api.HTMLIframeElement.getSVGDocument
---

{{APIRef("HTML DOM")}}

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

## Value

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

## Examples

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

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("HTMLEmbedElement.getSVGDocument")}}
- {{domxref("HTMLObjectElement.getSVGDocument")}}
5 changes: 4 additions & 1 deletion files/en-us/web/api/htmliframeelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ _Inherits properties from its parent, {{domxref("HTMLElement")}}_.

## Instance methods

_Inherits methods from its parent, {{domxref("HTMLElement")}}_.
_Also inherits methods from its parent interface, {{domxref("HTMLElement")}}._

- {{domxref("HTMLIframeElement.getSVGDocument()")}}
- : Returns the embedded SVG as a {{domxref("Document")}}.

## Specifications

Expand Down
34 changes: 34 additions & 0 deletions files/en-us/web/api/htmlobjectelement/getsvgdocument/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
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.

## Value

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

## Examples

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

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("HTMLIFrameElement.getSVGDocument")}}
- {{domxref("HTMLEmbedElement.getSVGDocument")}}
2 changes: 2 additions & 0 deletions files/en-us/web/api/htmlobjectelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ _Inherits methods from its parent, {{domxref("HTMLElement")}}._

- {{domxref("HTMLObjectElement.checkValidity()")}}
- : Always returns `true` because {{HTMLElement("object")}} elements are never candidates for constraint validation.
- {{domxref("HTMLObjectElement.getSVGDocument()")}}
- : Returns the embedded SVG as a {{domxref("Document")}}.
- {{domxref("HTMLObjectElement.reportValidity()")}}
- : Always returns `true` because {{HTMLElement("object")}} elements are never candidates for constraint validation.
- {{domxref("HTMLObjectElement.setCustomValidity()")}}
Expand Down

0 comments on commit f5af74a

Please sign in to comment.