Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New pages: getSVGDocument() method pages #36986

Merged
merged 4 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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