Back to Content

SVGMaskElement

files/en-us/web/api/svgmaskelement/index.md

latest1.9 KB
Original Source

{{APIRef("SVG")}}

The SVGMaskElement interface provides access to the properties of {{SVGElement("mask")}} elements, as well as methods to manipulate them.

{{InheritanceDiagram}}

Instance properties

This interface also inherits properties from its parent, {{domxref("SVGElement")}}.

  • {{domxref("SVGMaskElement.maskUnits")}} {{ReadOnlyInline}}
    • : An {{domxref("SVGAnimatedEnumeration")}} corresponding to the {{SVGAttr("maskUnits")}} attribute of the given {{SVGElement("mask")}} element. Takes one of the constants defined in {{domxref("SVGUnitTypes")}}.
  • {{domxref("SVGMaskElement.maskContentUnits")}} {{ReadOnlyInline}}
    • : An {{domxref("SVGAnimatedEnumeration")}} corresponding to the {{SVGAttr("maskContentUnits")}} attribute of the given {{SVGElement("mask")}} element. Takes one of the constants defined in {{domxref("SVGUnitTypes")}}.
  • {{domxref("SVGMaskElement.x")}} {{ReadOnlyInline}}
    • : An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("x")}} attribute of the given {{SVGElement("mask")}} element.
  • {{domxref("SVGMaskElement.y")}} {{ReadOnlyInline}}
    • : An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("y")}} attribute of the given {{SVGElement("mask")}} element.
  • {{domxref("SVGMaskElement.width")}} {{ReadOnlyInline}}
    • : An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("width")}} attribute of the given {{SVGElement("mask")}} element.
  • {{domxref("SVGMaskElement.height")}} {{ReadOnlyInline}}
    • : An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("height")}} attribute of the given {{SVGElement("mask")}} element.

Instance methods

This interface doesn't implement any specific methods, but inherits methods from its parent interface, {{domxref("SVGElement")}}.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{SVGElement("mask")}}