I am diverting user to some url through window.location but this url opens in the same tab in browser. I want it to be open in new tab. Can I do so with window.
window.location
This works for me on Chrome 53. Haven't tested anywhere else:
function navigate(href, newTab) { var a = document.createElement('a'); a.href = href; if (newTab) { a.setAttribute('target', '_blank'); } a.click(); }