files/en-us/web/api/svgaelement/index.md
{{APIRef("SVG")}}
The SVGAElement interface provides access to the properties of an {{SVGElement("a")}} element, as well as methods to manipulate them.
{{InheritanceDiagram}}
This interface also inherits properties from its parent, {{domxref("SVGGraphicsElement")}}.
#), if any, in the referenced URL./ followed by the path of the URL, not including the query string or fragment.ping attribute, containing a space-separated list of URLs to which, when the hyperlink is followed, {{HTTPMethod("POST")}} requests with the body PING will be sent by the browser (in the background). Typically used for tracking.:), of the referenced URL.rel SVG attribute, specifying the relationship of the link's target.rel SVG attribute, as a list of tokens.?).type attribute, indicating the MIME type of the linked resource.This interface has no methods but inherits methods from its parent, {{domxref("SVGGraphicsElement")}}.
In the example below, the {{SVGAttr("target")}} attribute of the {{SVGElement("a")}} element is set to _blank and when the link is clicked, it logs to notify whether the condition is met or not.
const linkRef = document.querySelector("a");
linkRef.target = "_self";
linkRef.onclick = () => {
if (linkRef.target === "_blank") {
console.log("BLANK!");
linkRef.target = "_self";
} else {
console.log("SORRY! not _blank");
}
};
{{Specifications}}
{{Compat}}