-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New pages: HTMLEmbedElement property and method (#36985)
- Loading branch information
Showing
3 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
files/en-us/web/api/htmlembedelement/getsvgdocument/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: "HTMLEmbedElement: getSVGDocument() method" | ||
short-title: getSVGDocument | ||
slug: Web/API/HTMLEmbedElement/getSVGDocument | ||
page-type: web-api-instance-method | ||
browser-compat: api.HTMLEmbedElement.getSVGDocument | ||
--- | ||
|
||
{{APIRef("HTML DOM")}} | ||
|
||
The **`getSVGDocument()`** method of the {{domxref("HTMLEmbedElement")}} 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("HTMLObjectElement.getSVGDocument")}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: "HTMLEmbedElement: type property" | ||
short-title: type | ||
slug: Web/API/HTMLEmbedElement/type | ||
page-type: web-api-instance-property | ||
browser-compat: api.HTMLEmbedElement.type | ||
--- | ||
|
||
{{APIRef("HTML DOM")}} | ||
|
||
The **`type`** property of the {{domxref("HTMLEmbedElement")}} interface returns a string that reflects the `type` attribute of the {{HTMLElement("embed")}} element, indicating the {{glossary("MIME type")}} of the resource. It reflects the {{htmlelement("embed")}} element's [`type`](/en-US/docs/Web/HTML/Element/embed#type) attribute | ||
|
||
## Value | ||
|
||
A string; the MIME type of the resource. | ||
|
||
## Examples | ||
|
||
```js | ||
const el = document.getElementById("el"); | ||
console.log(el.type); // Output: "video/webp" | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("HTMLObjectElement.type")}} | ||
- {{domxref("HTMLSourceElement.type")}} | ||
- [Media types found on the web](/en-US/docs/Web/Media/Formats) | ||
- [Important MIME types for web developers](/en-US/docs/Web/HTTP/MIME_types#important_mime_types_for_web_developers) |