title: Mozilla Firefox doesn't load SVG objects in addEventListener('load'
body: <p>I don't know why, but it works on Chrome and Safari, not in Mozilla.
  I have <code>object</code> html tag that loads svg file. File contains <code>.s0</code> classes. I want to handle event when you click on that class.</p>
  
  <p>Who knows what is wrong? sry, jsfiddle does not show <code>object</code> when I tried to paste code there.</p>
  
  <pre><code>&lt;object data="jo.svg" type="image/svg+xml" id="obj"&gt;&lt;/object&gt;
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>$(function() {
      var a = document.getElementById('obj');
          a.addEventListener("load", function() {
  
              // !!!
              console.log('this line is not reachable in Mozilla or reached before svg loaded');
  
              var svgDoc = a.contentDocument;
              var els = svgDoc.querySelectorAll(".s0");
              for (var i = 0, length = els.length; i &lt; length; i++) {
                  els[i].addEventListener("click", function() {
                      alert('clicked');
                  }, false);
              }
          });
  });
  </code></pre>