0

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

Tabam
  • 87
  • 1
  • 1
  • 5

1 Answers1

1

Check this answer on how to return data to parent on closing pop-up window.

Ghaith Troudi
  • 248
  • 1
  • 8