久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <legend id='hycPd'><style id='hycPd'><dir id='hycPd'><q id='hycPd'></q></dir></style></legend>
      <tfoot id='hycPd'></tfoot>
      <i id='hycPd'><tr id='hycPd'><dt id='hycPd'><q id='hycPd'><span id='hycPd'><b id='hycPd'><form id='hycPd'><ins id='hycPd'></ins><ul id='hycPd'></ul><sub id='hycPd'></sub></form><legend id='hycPd'></legend><bdo id='hycPd'><pre id='hycPd'><center id='hycPd'></center></pre></bdo></b><th id='hycPd'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='hycPd'><tfoot id='hycPd'></tfoot><dl id='hycPd'><fieldset id='hycPd'></fieldset></dl></div>

        <bdo id='hycPd'></bdo><ul id='hycPd'></ul>
    2. <small id='hycPd'></small><noframes id='hycPd'>

    3. Javascript:覆蓋 XMLHttpRequest.open()

      Javascript: Overriding XMLHttpRequest.open()(Javascript:覆蓋 XMLHttpRequest.open())

          <i id='4f3OA'><tr id='4f3OA'><dt id='4f3OA'><q id='4f3OA'><span id='4f3OA'><b id='4f3OA'><form id='4f3OA'><ins id='4f3OA'></ins><ul id='4f3OA'></ul><sub id='4f3OA'></sub></form><legend id='4f3OA'></legend><bdo id='4f3OA'><pre id='4f3OA'><center id='4f3OA'></center></pre></bdo></b><th id='4f3OA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='4f3OA'><tfoot id='4f3OA'></tfoot><dl id='4f3OA'><fieldset id='4f3OA'></fieldset></dl></div>
        • <legend id='4f3OA'><style id='4f3OA'><dir id='4f3OA'><q id='4f3OA'></q></dir></style></legend>
            <tbody id='4f3OA'></tbody>

          <small id='4f3OA'></small><noframes id='4f3OA'>

              • <bdo id='4f3OA'></bdo><ul id='4f3OA'></ul>

                <tfoot id='4f3OA'></tfoot>
                本文介紹了Javascript:覆蓋 XMLHttpRequest.open()的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我如何能夠覆蓋 XMLHttpRequest.open() 方法,然后捕獲并更改它的參數(shù)?

                How would I be able to override the XMLHttpRequest.open() method and then catch and alter it's arguments?

                我已經(jīng)嘗試過代理方法,但它不起作用,盡管在調(diào)用 XMLHttpRequest() 時刪除了打開覆蓋:

                I've already tried the proxy method but it didn't work, although removing the open over-rid when XMLHttpRequest() was called:

                (function() {
                    var proxied = window.XMLHttpRequest.open;
                    window.XMLHttpRequest.open = function() {
                        $('.log').html(arguments[0]);
                        return proxied.apply(this, arguments);
                    };
                })();
                

                推薦答案

                你不是在修改 XMLHttpRequest objects 繼承的 open 方法,只是在 XMLHttpRequest objects 中添加一個方法code>XMLHttpRequest 構造函數(shù) 實際上從未使用過.

                You are not modifying the open method inherited by XMLHttpRequest objects but just adding a method to the XMLHttpRequest constructor which is actually never used.

                我在 facebook 中嘗試了這段代碼,我能夠捕捉到請求:

                I tried this code in facebook and I was able to catch the requests:

                (function() {
                    var proxied = window.XMLHttpRequest.prototype.open;
                    window.XMLHttpRequest.prototype.open = function() {
                        console.log( arguments );
                        return proxied.apply(this, [].slice.call(arguments));
                    };
                })();
                
                /*
                    ["POST", "/ajax/chat/buddy_list.php?__a=1", true]
                    ["POST", "/ajax/apps/usage_update.php?__a=1", true]
                    ["POST", "/ajax/chat/buddy_list.php?__a=1", true]
                    ["POST", "/ajax/canvas_ticker.php?__a=1", true]
                    ["POST", "/ajax/canvas_ticker.php?__a=1", true]
                    ["POST", "/ajax/chat/buddy_list.php?__a=1", true]
                */
                

                所以是的,需要將 open 方法添加到 XMLHttpRequest 原型 (window.XMLHttpRequest.prototype) 而不是 XMLHttpRequest 構造函數(shù) (window.XMLHttpRequest)

                So yeah the open method needs to be added to XMLHttpRequest prototype (window.XMLHttpRequest.prototype) not XMLHttpRequest constructor (window.XMLHttpRequest)

                這篇關于Javascript:覆蓋 XMLHttpRequest.open()的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調(diào)用完成)
                JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發(fā)技術分
                Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)
                  <tbody id='gzMS0'></tbody>
              • <i id='gzMS0'><tr id='gzMS0'><dt id='gzMS0'><q id='gzMS0'><span id='gzMS0'><b id='gzMS0'><form id='gzMS0'><ins id='gzMS0'></ins><ul id='gzMS0'></ul><sub id='gzMS0'></sub></form><legend id='gzMS0'></legend><bdo id='gzMS0'><pre id='gzMS0'><center id='gzMS0'></center></pre></bdo></b><th id='gzMS0'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gzMS0'><tfoot id='gzMS0'></tfoot><dl id='gzMS0'><fieldset id='gzMS0'></fieldset></dl></div>

                  <tfoot id='gzMS0'></tfoot>

                    1. <small id='gzMS0'></small><noframes id='gzMS0'>

                        <legend id='gzMS0'><style id='gzMS0'><dir id='gzMS0'><q id='gzMS0'></q></dir></style></legend>
                        • <bdo id='gzMS0'></bdo><ul id='gzMS0'></ul>
                          主站蜘蛛池模板: 99在线视频观看 | 久久美女网 | 久久国产亚洲 | 久久久这里都是精品 | 九九免费在线视频 | 国产在线精品一区二区 | 日韩精品一区二区三区中文字幕 | 美人の美乳で授乳プレイ | 欧美男人天堂 | 亚洲91| 欧美另类视频在线 | 熟女毛片 | 国产乱码久久久久久 | 亚洲高清一区二区三区 | av黄在线观看 | 亚洲精品久久久一区二区三区 | 一级无毛片 | 国产欧美日韩一区二区三区在线观看 | 国产在线视频一区二区董小宛性色 | 欧美久久视频 | 亚洲精品一区二三区不卡 | 成人h视频在线观看 | 天天拍天天射 | 国产精品久久二区 | 天天爽综合网 | 久久精品小视频 | 日韩免费视频一区二区 | 成人在线免费观看av | 成人免费视频在线观看 | 日韩精品久久一区 | 午夜视频免费在线 | 亚洲午夜精品视频 | 国产一级精品毛片 | 成人欧美一区二区三区黑人孕妇 | 欧美久| 免费在线观看黄视频 | 久久精品国产99国产精品 | 欧美在线小视频 | 亚洲欧美激情网 | a在线视频观看 | 国产亚洲一区二区在线观看 |