Attributes
An Attributes object holds attributes for a variety of other objects.
Signature
Attributes new Attributes()
The Attributes constructor takes no arguments.
Properties
An Attributes object comes with the following property:
list: Holds the internal object in which attributes are stored
Methods
An Attributes object exposes the following methods:
- Attributes.add()
- Attributes.asPropsIfPrefixIs()
- Attributes.asRenderProps()
- Attributes.clone()
- Attributes.get()
- Attributes.getAsArray()
- Attributes.remove()
- Attributes.render()
- Attributes.renderAsCss()
- Attributes.renderIfPrefixIs()
- Attributes.set()
- Attributes.setIfUnset()
Notes
Attributes are attached to Point,
Path, and Snippet objects,
as well as the internal Svg object.
All of these have an instantiated Attributes object in their attributes
property, as well as a number of (chainable) helper methods to manipulate the
attributes. You will typically use these higher-level method and thus are
unlikely to interact with an Attributes object directly.