title: CSSRules is empty
body: <p>I have this very simple HTML page, and I'm trying to get the CSSRules of #poulet, but when I'm accessing the documents.styleSheets[0].cssRules I get this error in Chrome v5.0.375.55:<br>
  Uncaught TypeError: Cannot read property 'length' of null</p>
  
  <p>Here is what my code looks like:  </p>
  
  <p>HTML FILE</p>
  
  <pre><code>&lt;!DOCTYPE html&gt; 
  &lt;html lang="en"&gt; 
  &lt;head&gt;
  &lt;link rel="stylesheet" href="css/test.css" type="text/css" /&gt;
  &lt;script type="text/javascript" src="js/test.js"&gt;&lt;/script&gt;
  &lt;title&gt;Mozilla&lt;/title&gt;
  &lt;script&gt;
  window.onload = function(){
      var test = findKeyframesRule('poulet');
      alert(test);
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="poulet"&gt;
          allo
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>JS FILE</p>
  
  <pre><code>function findKeyframesRule(rule)
  {
      var ss = document.styleSheets;
  
      for (var i = 0; i &lt; ss.length; ++i)
      {       
          for (var j = 0; j &lt; ss[i].cssRules.length; ++j)
          {
              if (ss[i].cssRules[j].type == window.CSSRule.WEBKIT_KEYFRAMES_RULE &amp;&amp; ss[i].cssRules[j].name == rule)
                  return ss[i].cssRules[j];
          }
      }
      return null;
  }
  </code></pre>
  
  <p>CSS FILE</p>
  
  <pre><code>html, body {
      background: #cccccc;
  }
  
  #poulet{
      border: 10px solid pink;
  }
  </code></pre>
  
  <p>The files can be found <a href="http://wapshop.gameloft.com/stef_test/test.html" rel="nofollow noreferrer">here</a>. I really need help on this one, please!!! D:</p>