title: chrome.webRequest not working?
body: <p>I'm trying to implement the chrome.webRequest API in my extension but for some reason it's just not working no matter what I do. Can someone post an example of usage? or correct my mistakes? Basically what I'm trying to do is to intercept the recieved headers from a response.</p>
  
  <p>This is an implementation for onBeforeSendHeaders but I'd like to use OnHeadersRecieved as well
  :</p>
  
  <pre><code>var requestFilter = {
      urls: [ "&lt;all_urls&gt;" ]
    },
    // The 'extraInfoSpec' parameter modifies how Chrome calls your
    // listener function. 'requestHeaders' ensures that the 'details'
    // object has a key called 'requestHeaders' containing the headers,
    // and 'blocking' ensures that the object your function returns is
    // used to overwrite the headers
    extraInfoSpec = ['requestHeaders','blocking'],
    // Chrome will call your listener function in response to every
    // HTTP request
    handler = function( details ) {
      alert(details);
      var headers = details.requestHeaders,
        blockingResponse = {};
  
      // Each header parameter is stored in an array. Since Chrome
      // makes no guarantee about the contents/order of this array,
      // you'll have to iterate through it to find for the
      // 'User-Agent' element
      for( var i = 0, l = headers.length; i &lt; l; ++i ) {
        if( headers[i].name == 'User-Agent' ) {
          headers[i].value = '&gt;&gt;&gt; Your new user agent string here &lt;&lt;&lt;';
          break;
        }
        // If you want to modify other headers, this is the place to
        // do it. Either remove the 'break;' statement and add in more
        // conditionals or use a 'switch' statement on 'headers[i].name'
      }
  
      blockingResponse.requestHeaders = headers;
      return blockingResponse;
    };
  
  chrome.webRequest.onBeforeSendHeaders.addListener( handler, requestFilter, extraInfoSpec );
  </code></pre>
  
  <p>this is my manifest file:</p>
  
  <pre><code>    {
     "background_page": "iRBackground.html",
     "browser_action": {
        "default_icon": "Off.png",
        "popup": "iRMenu.html"
     },
     "content_scripts": [ {
        "js": [ "Content.js" ],
        "matches": [ "http://*/*" ],
        "run_at": "document_start"
     } ],
     "description": "***",
     "icons": {
        "128": "On128x128.png",
        "16": "On.png",
        "48": "On48x48.png"
     },
     "key": "****",
     "manifest_version": 2,
     "name": "***",
     "permissions": [ "tabs", "notifications", "unlimitedStorage", "webRequest", “webRequestBlocking”, “&lt;all_urls&gt;”],
     "update_url": "***/Chrome/UpdateVersion.xml",
     "version": "1.3"
  }
  </code></pre>
  
  <p>the error I get from Chrome is: <code>Uncaught TypeError: Cannot read property 'onBeforeSendHeaders' of undefined</code></p>
  
  <p>Anyone see anything wrong??? thanks</p>