Inline Event Registration works correctly if I use code similar to
onerror=function(this) // in xhtml placed in element
However advanced event registration does not work, i.e.
a.onerror=function(this) // where a. is the element in javascript
when I want to correctly update this.src to a new image on fail.
needed to use addEventListener