title: Tab readystate returns 'complete' before first server response
body: <p>I have an add-on which is button-activated. The code is as follows: </p>
  
  <pre><code>function handleClick(state) {
  activeTab = tabs.activeTab;
    console.log('readystate: ' + activeTab.readyState);
    if(activeTab.readyState != 'complete')
    {
      activeTab.on('load', function(){
        activeTab.removeListener(this);
        start();
      });
    }
    else
      start();
  }
  </code></pre>
  
  <p>However, somehow the above code always returns "complete" whenever I ask the tab for its current readystate. I'm absolutely sure the page is still loading, the spinner is still running and I actually have PHP breakpoint enabled with XDebug to make sure my page will never finish loading until I want it to. According to the <a href="https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/tabs" rel="nofollow">Mozilla tabs docs</a> the readystate should be "loading", because the PHP is not even finished so the server has not sent back any HTML so there isn't even a DOM.</p>
  
  <p>Update: What i've found out so far is that the readystate returns 'complete' until you get the first server response. Once the initial server response gets back to the browser the readystate changes to "loading". Not sure how to go on from there.</p>