<!DOCTYPE html>
<html>
<body>
<h1>The Window Object</h1>
<h2>The resizeBy() Method</h2>
<p>Open a new window, and decrease width by 50px, and increase height by 50px.</p>
<p>Click the "Resize window" button multiple times.</p>
<button onclick="openWin()">Create window</button>
<button onclick="resizeWin()">Resize window</button>
<script>
let myWindow;
function openWin() {
myWindow = window.open("", "", "width=500, height=500");
}
function resizeWin() {
myWindow.resizeBy(-50, 50);
}
</script>
</body>
</html>