MathMLAnchorElement: target property
The target property of the MathMLAnchorElement interface is a string that indicates where to display the linked resource.
It reflects the target attribute of the <a> element.
Value
A string representing the target. Its value can be one of the keywords _blank, _self, _parent, or _top.
Examples
>Basic usage
Given this MathML:
html
<math>
<a id="myAnchor" href="https://example.com" target="_blank"> ... </a>
</math>
you can get the target of the anchor like this:
js
const mathAnchor = document.getElementById("myAnchor");
mathAnchor.target; // returns '_blank'
Specifications
| Specification |
|---|
| MathML Core> # dom-mathmlanchorelement-target> |
Browser compatibility
See also
- The MathML
<a>element