diff --git a/files/en-us/web/api/htmlembedelement/getsvgdocument/index.md b/files/en-us/web/api/htmlembedelement/getsvgdocument/index.md new file mode 100644 index 000000000000000..7025a42956c1d84 --- /dev/null +++ b/files/en-us/web/api/htmlembedelement/getsvgdocument/index.md @@ -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")}} diff --git a/files/en-us/web/api/htmlembedelement/index.md b/files/en-us/web/api/htmlembedelement/index.md index 3d97aa993ca104d..6a4bc07484b1cde 100644 --- a/files/en-us/web/api/htmlembedelement/index.md +++ b/files/en-us/web/api/htmlembedelement/index.md @@ -33,7 +33,10 @@ _Inherits properties from its parent, {{domxref("HTMLElement")}}._ ## Instance methods -_No specific method; inherits methods from its parent, {{domxref("HTMLElement")}}._ +_Also inherits methods from its parent interface, {{domxref("HTMLElement")}}._ + +- {{domxref("HTMLEmbedElement.getSVGDocument()")}} + - : Returns the embedded SVG as a {{domxref("Document")}}. ## Specifications diff --git a/files/en-us/web/api/htmlembedelement/type/index.md b/files/en-us/web/api/htmlembedelement/type/index.md new file mode 100644 index 000000000000000..42fe8e691f0cba0 --- /dev/null +++ b/files/en-us/web/api/htmlembedelement/type/index.md @@ -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)