Open a new tab with javascript but stay on current tab

后端 未结 4 1036
感动是毒
感动是毒 2020-11-27 21:58

Is it possible to open a new tab in Firefox (in background) using window.open(\"http://www.google.com\") function, and remain the current tab?

Thanks fo

4条回答
  •  执念已碎
    2020-11-27 22:21

    You can't open tabs in the background using javascript because this is set in the user's preferences in about:config, which you have no control over. The setting is:

    browser.tabs.loadDivertedInBackground=true
    

提交回复
热议问题