<small id='yjMw3'></small><noframes id='yjMw3'>

    1. <legend id='yjMw3'><style id='yjMw3'><dir id='yjMw3'><q id='yjMw3'></q></dir></style></legend>
      <i id='yjMw3'><tr id='yjMw3'><dt id='yjMw3'><q id='yjMw3'><span id='yjMw3'><b id='yjMw3'><form id='yjMw3'><ins id='yjMw3'></ins><ul id='yjMw3'></ul><sub id='yjMw3'></sub></form><legend id='yjMw3'></legend><bdo id='yjMw3'><pre id='yjMw3'><center id='yjMw3'></center></pre></bdo></b><th id='yjMw3'></th></span></q></dt></tr></i><div id='yjMw3'><tfoot id='yjMw3'></tfoot><dl id='yjMw3'><fieldset id='yjMw3'></fieldset></dl></div>
    2. <tfoot id='yjMw3'></tfoot>
      • <bdo id='yjMw3'></bdo><ul id='yjMw3'></ul>
      1. 避免浏览器弹出窗口拦截器

        Avoid browser popup blockers(避免浏览器弹出窗口拦截器)

        <small id='HGAD7'></small><noframes id='HGAD7'>

          • <tfoot id='HGAD7'></tfoot>
            <i id='HGAD7'><tr id='HGAD7'><dt id='HGAD7'><q id='HGAD7'><span id='HGAD7'><b id='HGAD7'><form id='HGAD7'><ins id='HGAD7'></ins><ul id='HGAD7'></ul><sub id='HGAD7'></sub></form><legend id='HGAD7'></legend><bdo id='HGAD7'><pre id='HGAD7'><center id='HGAD7'></center></pre></bdo></b><th id='HGAD7'></th></span></q></dt></tr></i><div id='HGAD7'><tfoot id='HGAD7'></tfoot><dl id='HGAD7'><fieldset id='HGAD7'></fieldset></dl></div>

                <tbody id='HGAD7'></tbody>
                <bdo id='HGAD7'></bdo><ul id='HGAD7'></ul>

                <legend id='HGAD7'><style id='HGAD7'><dir id='HGAD7'><q id='HGAD7'></q></dir></style></legend>
                  本文介绍了避免浏览器弹出窗口拦截器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开发一个纯 JavaScript 的 OAuth 身份验证流程,我想在弹出窗口中向用户显示授予访问权限"窗口,但它被阻止了.

                  I'm developing an OAuth authentication flow purely in JavaScript and I want to show the user the "grant access" window in a popup, but it gets blocked.

                  如何防止由 window.openwindow.showModalDialog 创建的弹出窗口被不同浏览器的弹出窗口阻止程序阻止?

                  How can I prevent pop up windows created by either window.open or window.showModalDialog from being blocked by the different browsers' pop-up blockers?

                  推荐答案

                  一般规则是,如果 window.open 或类似的内容是从 直接用户操作.也就是说,您可以调用 window.open 来响应按钮单击而不会被弹出窗口阻止程序击中,但是如果您将相同的代码放入计时器事件中,它将被阻止.调用链的深度也是一个因素 - 一些较旧的浏览器只查看直接调用者,较新的浏览器可以回溯一点以查看调用者的调用者是否是鼠标点击等.保持尽可能浅以避免弹出窗口阻止程序.

                  The general rule is that popup blockers will engage if window.open or similar is invoked from javascript that is not invoked by direct user action. That is, you can call window.open in response to a button click without getting hit by the popup blocker, but if you put the same code in a timer event it will be blocked. Depth of call chain is also a factor - some older browsers only look at the immediate caller, newer browsers can backtrack a little to see if the caller's caller was a mouse click etc. Keep it as shallow as you can to avoid the popup blockers.

                  这篇关于避免浏览器弹出窗口拦截器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What are valid deviceNames for Chrome emulation testing with Protractor?(使用 Protractor 进行 Chrome 模拟测试的有效设备名称是什么?)
                  Protractor Check if Element Does Not Exist(量角器检查元素是否不存在)
                  Protractor e2e Tests Login Redirection(Protractor e2e 测试登录重定向)
                  Explain about async/ await in Protractor(解释 Protractor 中的 async/await)
                  Protractor browser.wait doesn#39;t wait(量角器 browser.wait 不等待)
                  How to use Protractor with Angular 2?(如何在 Angular 2 中使用量角器?)
                      <tbody id='fZczC'></tbody>

                    <tfoot id='fZczC'></tfoot>
                      1. <i id='fZczC'><tr id='fZczC'><dt id='fZczC'><q id='fZczC'><span id='fZczC'><b id='fZczC'><form id='fZczC'><ins id='fZczC'></ins><ul id='fZczC'></ul><sub id='fZczC'></sub></form><legend id='fZczC'></legend><bdo id='fZczC'><pre id='fZczC'><center id='fZczC'></center></pre></bdo></b><th id='fZczC'></th></span></q></dt></tr></i><div id='fZczC'><tfoot id='fZczC'></tfoot><dl id='fZczC'><fieldset id='fZczC'></fieldset></dl></div>
                      2. <small id='fZczC'></small><noframes id='fZczC'>

                        • <bdo id='fZczC'></bdo><ul id='fZczC'></ul>

                            <legend id='fZczC'><style id='fZczC'><dir id='fZczC'><q id='fZczC'></q></dir></style></legend>