title: Cannot read property 'contentDocument' of null
body: <p>I have an SVG map that is niserted into HTML with help of the 'object' tag. Then, I try to use jQuery to access map's elements. (In particular I try to fill a rectangular in red.)</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;object data="map.svg" type="image/svg+xml" id="map" width="1840" height="940"&gt;&lt;/object&gt;
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>jQuery(window).load(function () {
          var svgobject = document.getElementById('map');
          if ('contentDocument' in svgobject) {
              var svgdom = jQuery(svgobject.contentDocument);
              jQuery("#rect4578", svgdom).attr("fill", "red");
          }
      });
  </code></pre>
  
  <p>In chrome I get an error: Cannot read property 'contentDocument' of null
  (anonymous function)
  n.event.duspatch
  n.event.add.r.handle</p>
  
  <p>What is the problem?</p>
  
  <p>Thank you.</p>