<map name="image-map">
<area href="www.example.com" target="_top" alt="left" />
</map>HTMLAreaElement: target property / notebook
HTMLAreaElement: target property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const areaElement = document.getElementsByName("image-map")[0].areas[0];
console.log(areaElement.target); // Output: "_top"