title: chrome getSVGDocument() not work / how to get svg document in a html file in chrome?
body: <p>Belows are codes.</p>
  
  <p>Or try this(temporarily): <a href="http://ihome.ust.hk/~cs_lyfac/svgQuestion/a.html" rel="nofollow">http://ihome.ust.hk/~cs_lyfac/svgQuestion/a.html</a></p>
  
  <p>When you hit enter it is fine and svgDocument object is alerted. But if you refresh it, it is undefined. Why? Moreover, it is always undefined when in local mode.</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Animating SVG&lt;/title&gt;
          &lt;script type="text/javascript" src="gear.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body bgcolor="#CCAAFF" onload="RotateSVG()"&gt;
  
          &lt;object id="gear" data="gear.svg" type="image/svg+xml"
                  width="500" height="500"
                  style="position: absolute; top: -250px; left: -250px;"&gt;
          &lt;/object&gt;
  
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>function RotateSVG()
  {
  
      var svgTag = document.getElementById("gear");
      var svgDoc = null;
  
      svgDoc = svgTag.getSVGDocument();
      alert(svgDoc);
  
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;svg xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink"
       version="1.1"
       baseProfile="full"&gt;
  &lt;!-- http://www.mozilla.org/projects/svg/ --&gt;
    &lt;g id="gearG" fill-opacity="0.7" stroke="black" stroke-width="0.1cm"&gt;
      &lt;circle cx="6cm" cy="2cm" r="100" fill="red"
                      transform="translate(0,50)" /&gt;
      &lt;circle cx="6cm" cy="2cm" r="100" fill="blue"
                      transform="translate(70,150)" /&gt;
      &lt;circle cx="6cm" cy="2cm" r="100" fill="green"
                      transform="translate(-70,150)" /&gt;
    &lt;/g&gt;
  &lt;/svg&gt;
  </code></pre>