I need to open a download page in a new tab, and after the download is complete, it should close and will come back to parent page automatically. But, I do not want the user to stay in the download blank page. I just want to open a download tab and get the user back to the application's tab.
I've tried,
let win = window.open('http://google.com', '_blank');
win.opener(); // x
win.parent(); // x
win.opener.parent.focus(); // x
window.focus() // x
but nothing works, is it possible to do that? If so, then how?
(I need to support IE9+, FF and chrome)