An Anchor that points from the attribute of an HTML element.

Type Parameters

  • E extends Element

  • A extends string



resource?: Resource
element: E
attribute: A
rangeWithinAttribute?: [number, number]

The character position of the URL inside the attribute.

Relevant for attributes that contain more than a single URL; e.g. the srcset of an <img>.

It is not yet implemented for the style attribute (it depends on CssAnchor.range).