qutebrowser/tests/end2end/data/javascript/windowsize.html
Florian Bruhin 57fbfbd606 Set an initial window size for background tabs
When we open a background tab, it gets a hardcoded size (800x600 or so) because
it doesn't get resized by the layout yet.

By resizing it to the size it'll actually have later, we make sure scrolling to
an anchor in an background tab works, and JS also gets the correct size for
background tabs.

Fixes #1190
Fixes #2495
See #1417
2017-06-11 17:48:01 +02:00

25 lines
728 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>window sizes</title>
<script>
function updateText(elem) {
var size = window.innerWidth + "/" + window.innerHeight;
document.getElementById(elem).textContent = size;
console.log(elem + " window size: " + size);
}
document.addEventListener("DOMContentLoaded", function() {
updateText("hidden");
console.log("loaded");
});
</script>
</head>
<body>
<p>visible: <span id="visible">unknown</span></p>
<p>hidden: <span id="hidden">unknown</span></p>
</body>
</html>