SVGFEFloodElement: result-Eigenschaft

Baseline Widely available

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

We’d love to hear your thoughts on the next set of proposals for the JavaScript language. You can find a description of the proposals here.
Please take two minutes to fill out our short survey.

Die result schreibgeschützte Eigenschaft des SVGFEFloodElement-Interfaces beschreibt den zugewiesenen Namen eines SVG-Filterprimitives als SVGAnimatedString.

Sie spiegelt das result-Attribut des <feFlood>-Elements wider, welches eine SVG-Filter-Unterregion mit der Farbe und Deckkraft füllt, die durch flood-color und flood-opacity definiert sind. Der Attributwert ist ein <custom-ident>. Wenn angegeben, können Grafiken, die aus der Verarbeitung dieses Filterprimitives resultieren, durch ein in-Attribut auf einem nachfolgenden Filterprimitive innerhalb desselben <filter>-Elements referenziert werden.

Wenn kein result-Attribut definiert ist, sind die result.baseVal und result.animVal des Filters leere Zeichenfolgen, und die Ausgabe des <feFlood>-Filters wird nur dann für die Wiederverwendung als impliziter Eingang in das nächste Filterprimitive verfügbar sein, wenn dieses Filterprimitive keinen Wert für sein in-Attribut bereitstellt.

Wert

Beispiel

js
const feFloodElement = document.querySelector("feFlood");
const filterName = feFloodElement.result;
console.log(filterName.baseVa); // the filter's assigned name

Spezifikationen

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

Browser-Kompatibilität

Siehe auch