久久久久久久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>
                          主站蜘蛛池模板: 91www在线观看 | 亚洲精品视频在线看 | 日韩中文字幕 | 国产不卡在线观看 | 一区在线免费视频 | www国产亚洲精品久久网站 | 逼逼网 | 亚洲va国产日韩欧美精品色婷婷 | 一区二区三区在线 | 欧 | 久久天天 | av网站免费看 | 日韩欧美成人一区二区三区 | 亚洲一区视频在线播放 | 97成人在线 | 日本a级大片 | 国产一区二区日韩 | 国产精品久久欧美久久一区 | 亚洲综合电影 | 在线观看亚洲专区 | 亚洲欧美在线一区 | 一级毛片网| 欧美成年人 | 91久色| 狠狠骚 | 中文字幕精品一区二区三区精品 | 亚洲成人av | 啪啪毛片 | 日韩毛片免费视频 | 欧美在线观看一区 | 国产乱码精品一品二品 | 成人免费在线播放 | 国产精品精品 | 91视频. | 国产欧美在线 | 中文字幕一二三区 | 男女下面一进一出网站 | 免费的一级视频 | 国产成人精品免高潮在线观看 | 欧美性久久 | 国产精品一区二区三 | 日韩免费一区 |