title: How to get chrome.webRequest.onBeforeRequest.addListener() to fire at Chrome startup?
body: <p>I am working on an extension for Chrome that utilizes a native messaging host.  My background.js registers a listener immediately to process all onBeforeRequest events (i.e., all requests) and pass them on to the native helper application.  This is all well and good when a page is visited after Chrome has started up, but when I click a URL that launches Chrome, my listener does not fire.</p>
  
  <p>Here is the basic structure of the listener at the top of my background.js:</p>
  
  <pre><code>chrome.webRequest.onBeforeRequest.addListener(function (details) {
      alert('forwarding request!');
      chrome.runtime.sendNativeMessage('&lt;extension name&gt;', { url: details.url });
  }, { urls: ['http://*', 'https://*'] }, ['blocking']);
  </code></pre>
  
  <p>Obviously, there are conditions in place that determine whether to pass off the request and block it in Chrome, but they are not relevant here.  Even without the sendNativeMessage bit, I cannot produce an alert for the URL that is clicked to launch an instance of Chrome.</p>
  
  <p>Any clever ways to register this listener before the first request at startup goes through?</p>