Expand description
Handling of xlink:href
and href
attributes
In SVG1.1, links to elements are done with the xlink:href
attribute. However, SVG2
reduced this to just plain href
with no namespace:
https://svgwg.org/svg2-draft/linking.html#XLinkRefAttrs
If an element has both xlink:href
and href
attributes, the href
overrides the
other. We implement that logic in this module.
Functions§
- Returns whether the attribute is either of
xlink:href
orhref
. - Sets an
href
attribute in preference over anxlink:href
one.