The problem with this approach is that code will often get blocked by the browser’s popup blocker and won’t open unless the user notices it was blocked and tells the browser to allow it (if they even notice it was blocked, however, chances are that users will just think it didn’t work and move on)
A better approach that is less likely to get blocked by the browser is to programmatically add an anchor tag to the page, then simulate a click of it, and then remove it from the page. While that might seem like a lot, the code is really pretty simple. Let’s take a look:
var link = document.createElement("a"); link.href = "https://customerfx.com/"; link.target = "_blank"; document.body.appendChild(link); link.click(); document.body.removeChild(link);
There’s still a possibility the browser might block this, but the chances are far less likely. Usually this approach won’t get blocked as a popup by the browser since it appears as the user clicked a hyperlink.