how to open url in new tab (for all browsers) not in window in unity webplayer

string url=“http://www.google.com/”;
Application.ExternalEval(“window.open('” + url + “‘,’_blank’)”);

This one is opening in new window in chrome and in new tab in some browser.
but i need to open in new tab for all browsers not in new window

Thank you

Have Unity web player call out to your webpage javascript. Then use whatever Javascript you’d usually use to open a page in a new tab. Although a quick google search (pro-tip) shows:

where this issue is discussed at length.

in C#


string url=“http://www.google.com/”;

Application.ExternalEval(“openLink”, url); // openLink is javascript function.

In Html page

function openLink(url){

window.open(url,“width=window.innerWidth”); //window.open(url,“_blank”);

}

2nd method…

function openLink(url){

var win = window.open(url, ‘_blank’);
win.focus();

}

but its not opening in new tab for all browser.