XMLHttpRequest
和fetch
来监听所有Ajax请求。,,``javascript,(function(open) {, XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {, this.addEventListener('load', function() {, console.log('Ajax request made: ' + method + ' ' + url);, }, false);, open.apply(this, arguments);, };,})(XMLHttpRequest.prototype.open);,,if (window.fetch) {, window.fetch = function() {, console.log('Ajax request made: ' + arguments[0]);, return originalFetch.apply(this, arguments);, };,},
``