I have a button that needs to open a new window as a popup (under the parent page). In IE/Firefox, it works fine, but in chrome the popup appears over (on top of) the parent
This code works up to Chrome 65:
function just_open() {
postMessage([...arguments]);
}
window.onmessage = function({data}){
return open(...data);
}
function openunder() {
just_open([...arguments]);
window.open().close();
}
Where openunder is just like open() except: