title: JavaScript: How can I intercept http requests from an iframe
body: <p>I programmatically set the url of an iframe within my web page.
  I must know which http requests are triggered from this url change (urls for css, scripts, images, etc loading).
  I intercepted XMLHttpRequest, but this object is never called...</p>
  
  <p>How can I intercept those http requests?</p>
  
  <p>Is there another way to "load" an iframe and get all triggered url requests?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>(function(xhr){
    var pt = xhr.prototype;
    pt._open = pt.open;
    pt.open = function(){
     console.log('Open called...');
     this._open.apply(this, arguments);
  })(XMLHttpRequest);
  ...
  $('#iframe').attr('src', 'http://www.stackoverflow.com');
  </code></pre>