SVGTextPathElement

Baseline Widely available

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

Constants

Method types

NameValueDescription
TEXTPATH_METHODTYPE_UNKNOWN0 The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
TEXTPATH_METHODTYPE_ALIGN1Corresponds to the value align.
TEXTPATH_METHODTYPE_STRETCH2Corresponds to the value stretch.

Spacing types

NameValueDescription
TEXTPATH_SPACINGTYPE_UNKNOWN0 The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
TEXTPATH_SPACINGTYPE_AUTO1Corresponds to the value auto.
TEXTPATH_SPACINGTYPE_EXACT2Corresponds to the value exact.

Instance properties

This interface also inherits properties from its parent interface, SVGTextContentElement.

SVGTextPathElement.hrefRead only

An SVGAnimatedString corresponding to the href or xlink:hrefDeprecated attribute of the given element.

SVGTextPathElement.startOffsetRead only

An SVGAnimatedLength corresponding to the X component of the startOffset attribute of the given element.

SVGTextPathElement.methodRead only

An SVGAnimatedEnumeration corresponding to the method attribute of the given element. It takes one of the TEXTPATH_METHODTYPE_* constants defined on this interface.

SVGTextPathElement.spacingRead only

An SVGAnimatedEnumeration corresponding to the spacing attribute of the given element. It takes one of the TEXTPATH_SPACINGTYPE_* constants defined on this interface.

Instance methods

This interface does not provide any specific methods, but implements those of its parent, SVGTextContentElement.

Specifications

Specification
Scalable Vector Graphics (SVG) 2
# InterfaceSVGTextPathElement

Browser compatibility

See also