SVGMarkerElement

SVG path segment interface

The SVGMarkerElement interface corresponds to the marker element.

Interface overview

Also implement None
Methods
  • void setOrientToAngle(in SVGAngle angle)
  • void setOrientToAuto()
Properties
Constants
  • SVG_MARKER_ORIENT_UNKNOWN = 0
  • SVG_MARKER_ORIENT_AUTO = 1
  • SVG_MARKER_ORIENT_ANGLE = 2
  • SVG_MARKERUNITS_UNKNOWN = 0
  • SVG_MARKERUNITS_USERSPACEONUSE = 1
  • SVG_MARKERUNITS_STROKEWIDTH = 2
Normative document SVG 1.1 (2nd Edition)

Constants

Orientation

Name Value Description
SVG_MARKER_ORIENT_UNKNOWN 0 The marker orientation 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.
SVG_MARKER_ORIENT_AUTO 1 Attribute orient has value 'auto'.
SVG_MARKER_ORIENT_ANGLE 2 Attribute orient has an angle value.

Units

Name Value Description
SVG_MARKERUNITS_UNKNOWN 0 The marker unit 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.
SVG_MARKERUNITS_USERSPACEONUSE 1 Attribute markerUnits is 'userSpaceOnUse'.
SVG_MARKERUNITS_STROKEWIDTH 2 Attribute markerUnits is 'strokeWidth'.

Properties

This interface also inherits properties from its parent interface, SVGElement, and implements properties from SVGExternalResourcesRequired, SVGAnimatedPreserveAspectRatio, and SVGStylable.

Name Type Description
refX SVGAnimatedLength Corresponds to attribute refX on the given marker element.
refY SVGAnimatedLength Corresponds to attribute refY on the given marker element.
markerUnits SVGAnimatedEnumeration Corresponds to attribute markerUnits on the given marker element. One of the Marker Unit Types defined on this interface.
markerWidth SVGAnimatedLength Corresponds to attribute markerWidth on the given marker element.
markerHeight SVGAnimatedLength Corresponds to attribute markerHeight on the given marker element.
orientType SVGAnimatedEnumeration Corresponds to attribute orient on the given marker element. One of the Marker Orientation Types defined on this interface.
orientAngle SVGAnimatedAngle Corresponds to attribute orient on the given marker element. If markerUnits is SVG_MARKER_ORIENT_ANGLE, the angle value for attribute orient; otherwise, it will be set to zero.

Methods

This also inherits methods from its parent, SVGElement, and implements properties from SVGStylable.

setOrientToAngle(in SVGAngle angle)
void

Sets the value of attribute orient to the given angle.

Exceptions:

  • a DOMException with code NO_MODIFICATION_ALLOWED_ERR is raised when the object itself is read only.
setOrientToAuto()
void

Sets the value of attribute orient to 'auto'.

Exceptions:

  • a DOMException with code NO_MODIFICATION_ALLOWED_ERR is raised when the object itself is read only.

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
SVGMarkerElement Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support
Full support
No support
No support
Compatibility unknown
Compatibility unknown