久久久久久久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() 方法,然后捕獲并更改它的參數?

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

                我已經嘗試過代理方法,但它不起作用,盡管在調用 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 構造函數 實際上從未使用過.

                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 構造函數 (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模板網!

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

                相關文檔推薦

                Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                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屋-程序員軟件開發技術分
                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 部分內容)
                  <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>
                          主站蜘蛛池模板: 日本成人在线免费视频 | 中文字幕1区2区3区 日韩在线视频免费观看 | 美女黄网| 亚洲高清免费视频 | 黄色一级特级片 | 国产欧美精品一区 | 精品三区 | 国产精品国产成人国产三级 | 中文字幕在线欧美 | 国产精品波多野结衣 | 欧洲色综合 | 巨大黑人极品videos精品 | 精品一区二区三区视频在线观看 | 免费在线观看一区二区三区 | 欧美日韩亚洲国产 | 亚洲一区二区三区四区五区午夜 | 国内精品久久影院 | 天天操网 | 久久久av| 91美女在线观看 | 成人免费观看男女羞羞视频 | 成人av播放 | 国产精品国产三级国产aⅴ中文 | 欧美8一10sex性hd | 日本成人中文字幕 | 欧美日韩久久久久 | 日本免费在线 | 欧美videosex性极品hd | 国产美女在线精品免费 | 91国在线| 欧美日本韩国一区二区 | www.夜夜骑 | 国产小视频在线观看 | 日韩在线视频一区 | 亚洲精品二区 | 三区在线观看 | 国产一区二 | 99国产精品99久久久久久粉嫩 | 欧美成人不卡 | 久久综合九色综合欧美狠狠 | 国产小视频自拍 |