title: Uncaught DOMException: Failed to read the 'cssRules' property
body: <p>I wonder why does my script work on firefox but not on google chrome</p>
  
  <p>JS:</p>
  
  <pre><code>var _timelineWidth = (Number.parseInt(document.styleSheets[0].cssRules[16].style.width) / 100) * document.body.clientWidth;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>#timeline {
    position: relative;
    top: 15px;
    left: 12.5%;
    height: 5px;
    background: #aaa;
    border-radius: 2.5px;
    cursor: pointer;
  }
  </code></pre>
  
  <p>here's the error code from chrome</p>
  
  <blockquote>
    <p>Uncaught DOMException: Failed to read the 'cssRules' property from
    'CSSStyleSheet': Cannot access rules</p>
  </blockquote>