HTMLObjectElement: getSVGDocument() 方法

Baseline 已廣泛支援

此特性已相當成熟,可在許多裝置和瀏覽器版本上使用。自 ⁨2015 年 7 月⁩以來,各瀏覽器均已提供此特性。

getSVGDocument() 方法是 HTMLObjectElement 介面的一部分,用於返回嵌入式 SVG 的 Document 物件。

語法

js
getSVGDocument()

引數

無。

返回值

一個 Document

示例

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

規範

規範
HTML
# dom-media-getsvgdocument

瀏覽器相容性

另見