Coming from this answer that says:
You should set the
srcattribute after theonloadevent, f.ex:
Is 'el' already part of your live DOM? If so, when you change its onload event handler, it's contents will not be evaluated (because the load event already occurred).
el.onload = function() { //...
If el is not already added to the page, for instance if you're building a view, and will be injected into the page when everything is set, then yes it's load event will be fired when it's added to the page.
Be cautious about what might in the 'src' might depend on what happened in 'onload'.