So, i want open window, do stuff there using extension and closes page with sending callback status. I want it to work like this :
let page = window.open('https://_PAGE_.com', 'mywindow', 'menubar=1,resizable=1,width=250,height=250');
function check() {
if (page.closed) {
Console.log(`Status: ${page.STATUS_CALLBACK}`);
clearInterval(interval);
}
}
let interval = setInterval(function() {
check();
}, 100);
STATUS_CALLBACK wants to send from the page it opens and execute the extension code