Feature detect opening in a new window/tab(target=_blank) with JavaScript

后端 未结 2 512
隐瞒了意图╮
隐瞒了意图╮ 2021-02-13 03:22

According to my research:

  • \"WebView\" can disable \"opening links in new windows/tabs\".
  • WebView is used by native app developers to display webpages wit
2条回答
  •  礼貌的吻别
    2021-02-13 04:09

    As per OP Request i have tested it. And it works. If the pop-up blocker is enabled i will catch it and therefore i will get a reliable way to know that it is enabled. In this case i am just sending an alert, but you can do whatever you wish.

    Here is the code:

    
    
    
    
    Testing Pop-up Blocker
    
    
    
    

    Testing Pop-up Blocker

    And here is what i got, because the pop-up blocker was enabled.

提交回复
热议问题