Javascript - How to make a browser switch tabs?

前端 未结 2 1319
悲&欢浪女
悲&欢浪女 2021-01-15 16:02

In my code a timed event launches a ModalDialog. If the user switches tabs before the event the tab blinks but that is it.

Is there a way to make the browser switch

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-15 16:45

    There isn't a cross-browser way do focus a tab/window that's 100% reliable, especially in newer browsers. This would be an advertisers dream...so it's actively blocked in most newer browsers.

    As a user, I'm glad it's difficult in most cases, impossible in others to do this.

提交回复
热议问题