For getting the focus using a tabhandler name may help.. suppose we have
win = window.open("https://www.google.com", "test");
win.focus();
now every time the first line of above code runs the browser will first find the tab with the name test and reload it with the url https://www.google.com
and in case it does not find a tab with the name test it will open a new one. On the run of the second line it will set the focus to the same tab loaded from the first line.