<html>
<body>
<h1>The Window Object</h1>
<h2>The frameElement Property</h2>
<p>Is this window in a frame?</p>
<p id="demo"></p>
<script>
let answer = "NO";
if (window.frameElement) {
answer = "YES";
}
document.getElementById("demo").innerHTML = answer;
</script>
</body>
</html>