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

浏览器兼容性

另见