title: dynamically created iframe triggers onload event twice
body: <p>I created an iframe dynamically and found that this iframe trigger onload event twice.</p>
  
  <pre><code>var i=0;
  frameOnload=function(){
    console.log(i++);  
  };
  
  var ifr=document.createElement("iframe");  
  ifr.src="javascript:(function(){document.open();document.write('test');document.close();})();";
  ifr.onload=frameOnload;  
  document.body.appendChild(ifr);
  </code></pre>
  
  <p>Why i finally is 1?<br>
  How to prevent iframe's onload twice instead of pointing onload function to null inside itself?</p>