I created an iframe dynamically and found that this iframe trigger onload event twice.
var i=0; frameOnload=function(){ console.log(i++); }; var ifr=doc
I've had this happen to asynchronously loaded stylesheets, like this one.
I find that the simplest solution is to have the event remove itself: