0
I saw an example on MDN and tried to replicate it, but it doesn’t work, I mean, I don’t see the browser window being resized dynamically. Is such a method still used? is it coded correctly? My intention is to start a page HTML
already with a predefined window size (programmatically).
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<button onclick="quarter()">Pressione aqui</button>
<script>
function quarter() {
window.resizeTo(
window.screen.availWidth / 2,
window.screen.availHeight / 2
);
}
</script>
</body>
</html>
Daniel, it was worth a lot for what you already added! This detail of the instantiation!
– Fernandes