Many web browsers will let JavaScript code open a new window (or tab) using the
Window class. However, whether the new view is shown as a window or tab cannot
be specified by JS. It is entirely under the control of the browser, which
may let the user specify how new windows should appear. Rightfully so, the user
should be in control of their environment.
However, not all browsers will focus on the new view after it opens. For example,
if the user specifies that Google Chrome should open new windows as tabs, those new
tabs will be loaded in the background. The user will not see the contents until
they explicitly select that tab for viewing.