I have such situation. I try to open a window with window.open
function new window was opened in a front of main window, how can i open it in background of main window, without focus on new. Is it possible to do such thing?
open() returns, the window always contains about:blank . The actual fetching of the URL is deferred and starts after the current script block finishes executing. The window creation and the loading of the referenced resource are done asynchronously.
Hold Ctrl and left-click or middle-click the Reload button on the location/address bar to open the current page in a new tab.
What you seek is called a "pop-under" window
let handle = window.open()
handle.blur()
window.focus()
However, it's not a guarantee as user browser settings may override this behavior, especially pop-up blockers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With