SVGFEMorphologyElement: result 屬性

Baseline 已廣泛支援

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

resultSVGFEMorphologyElement 介面的一個只讀屬性,它將 SVG 濾鏡圖元的指定名稱描述為一個 SVGAnimatedString

它反映了 <feMorphology> 元素的 result 屬性。屬性值是 <custom-ident>。如果提供了該屬性,則處理此濾鏡圖元所產生的圖形可以透過同一 <filter> 元素內後續濾鏡圖元的 in 屬性進行引用。

如果未定義 result 屬性,則濾鏡的 result.baseValresult.animVal 為空字串,並且 <feMorphology> 濾鏡的輸出只有在其 in 屬性未提供值時,才能作為下一個濾鏡圖元的隱式輸入進行重用。

一個 SVGAnimatedString

示例

js
const feMorphologyElement = document.querySelector("feMorphology");
const filterName = feMorphologyElement.result;
console.log(filterName.baseVal); // the filter's assigned name

規範

規範
濾鏡效果模組第 1 級
# dom-svgfilterprimitivestandardattributes-result

瀏覽器相容性

另見