title: addEventListener("loadedmetadata",fun) doesn't run correctly ,Firefox misses event
body: <p>I wrote a page , and found addEventListener("loadedmetadata",fun) doesn't run correctly on firefox</p>
  
  <p>I'm trying fixing a bug of a old software .While loading video and page, the software try to draw some player-controller on the page .It worked well on Chrome and IE , but fail to draw some player-controller on Firefox .I tried debuging days until I found problem can simplify like this :</p>
  
  <pre><code>&lt;!DOCTYPE html&gt; 
  &lt;html&gt; 
  &lt;body&gt; 
  
  &lt;video id="myVideo" width="320" height="176" controls&gt;
    &lt;source src="video.mp4" type="video/mp4"&gt;
  
    Your browser does not support HTML5 video.
  &lt;/video&gt;
  
  &lt;script&gt;
  var vid = document.getElementById("myVideo");
  alert("The vid");
  vid.addEventListener("loadedmetadata", getmetadata);
  
  function getmetadata()
  {
  alert("Meta data for video loaded");
  }
  
  &lt;/script&gt; 
  
  &lt;p&gt;test&lt;/p&gt;
  
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>I expected firefox(41.0.1) to alert twice with ("The vid") and ("Meta data for video loaded") , but it didn't.
  These code run correctly on chrome 45 and IE11 .Both of these browers alert twice with ("The vid") and ("Meta data for video loaded") as I expected .</p>
  
  <p>Is it a bug of firefox ? How can I avoid this problem ?</p>
  
  <hr>
  
  <p>I just tired <code>vid.addEventListener("canplay", getmetadata);</code> and got the same result .
  It seems the problem is about 'addEventListener'</p>
  
  <hr>
  
  <p>The video was loaded . I can use vid.play to play it . I also used console.log(vid) to see if the DOM was right , and it was .</p>
  
  <p>It seems addEventListener skip watching "loadedmetadata" and "canplay" , and I don't know why .</p>
  
  <hr>
  
  <p>I just tried .oncanplay and .onloadedmetadata ,and found it was not the addEventListener ,but the Event caused this problem .</p>
  
  <p>While something (e.g. alert()) disturbed the loading , Firefox couldn't get the Event . So if the video came out to be 'On Loadedmetadata' or 'On Canplay' in the moment , firefox didn't catch up it . After that , the video is loadedmetadata or canplay .It's the attributes , not the event .Firefox misses the event , and rushes forward .</p>