SVGImageElement: crossOrigin 屬性

Baseline 2023
新推出

自 ⁨2023 年 12 月⁩起,此功能可在最新的裝置和瀏覽器版本上使用。此功能可能無法在較舊的裝置或瀏覽器上使用。

SVGImageElement 介面的 crossOrigin 屬性是一個字串,用於指定檢索影像時使用的跨域資源共享 (CORS) 設定。它反映了給定 <image> 元素的 crossorigin 內容屬性。

一個字串,指定了在獲取影像資源時使用的 CORS 模式。有效值為 "anonymous""use-credentials"。如果 crossOrigin 屬性設定為任何其他值,則與指定 "anonymous" 相同。

規範

規範
Scalable Vector Graphics (SVG) 2
# __svg__SVGImageElement__crossOrigin

瀏覽器相容性

另見