MDN self-hosted library · e01.org

HTMLBaseElement: target property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<head>
  <base target="_top" />
</head>
js
const baseElement = document.getElementsByTagName("base")[0];
console.log(baseElement.target); // Output: '_top'