このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

SVGFEDisplacementMapElement: result プロパティ

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.

resultSVGFEDisplacementMapElement インターフェイスの読み取り専用プロパティで、SVG フィルタープリミティブの割り当てられた名前の文字列を SVGAnimatedString で表します。

これは、<feDisplacementMap> 要素の result 属性を反映します。この属性の値は、<custom-ident> です。指定されている場合、このフィルタープリミティブの処理によって生成されたグラフィックは、同じ <filter> 要素内の後続のフィルタープリミティブにおける in 属性によって参照することができます。

result 属性が定義されていない場合、フィルターの result.baseVal および result.animVal は空文字列となり、<feDisplacementMap> フィルターの出力は、次のフィルタープリミティブが in 属性に値を提供していない場合にのみ、そのプリミティブへの暗黙的な入力として再利用可能となります。

SVGAnimatedString です。

js
const feDisplacementMapElement = document.querySelector("feDisplacementMap");
const filterName = feDisplacementMapElement.result;
console.log(filterName.baseVal); // フィルターに割り当てられた名前

仕様書

Specification
Filter Effects Module Level 1
# dom-svgfilterprimitivestandardattributes-result

ブラウザーの互換性

関連情報