SVGAElement
Baseline
Widely available
*
This feature is well established and works across many devices and browser versions. It’s been available across browsers since julho de 2015.
* Some parts of this feature may have varying levels of support.
O SVGAElement interface fornece acesso as propriedades do elemento <a>, bem como metodos para manipula-los.
Propriedades
Esta interface também herda propriedades de sua interface pai,SVGGraphicsElement, e implementa propriedades de SVGURIReference e de HTMLHyperlinkElementUtils.
SVGAElement.targetSomente leitura-
It corresponds to the
targetattribute of the given element.
Metodos
Esta interface não tem metodos próprios, porém herda metodos da interface SVGGraphicsElement.
Exemplos
No exemplo abaixo, o target atributo do elemento <a> recebe o valor _blank e quando o link for clicado, ele notifica se a condição é verdadeira ou falsa.
var linkRef = document.querySelector("a");
linkRef.target = "_self";
linkRef.onclick = function () {
if (linkRef.target === "_blank") {
console.log("BLANK!");
linkRef.target = "_self";
} else {
console.log("SORRY! not _blank");
}
};
Especificações
| Specification |
|---|
| Scalable Vector Graphics (SVG) 2> # InterfaceSVGAElement> |
Compatibilidade com navegadores
Loading…
Veja também
- SVG
<a>element