button('Click', e => {
const autoClose = w => {invalidation.then(() => w.close())};
const T = 1/3;
const positions = [
[0, 0, T, .5],
[T, 0, T, .5],
[T*2, 0, T, .5],
];
const sw = screen.availWidth,
sh = screen.availHeight;
for(const [x, y, w, h] of positions) {
const win = openWindow({features: {left: x*sw, top:y*sh, width: sw*w, height:sh*h}});
position(win, x, y, w, h);
autoClose(win);
win.document.body.appendChild(html`<p>${win.outerWidth}x${win.outerHeight}`);
setTimeout(() => {
win.document.body.appendChild(html`<p>${win.innerWidth}x${win.innerHeight}`);
}, 100);
}
})