For legacy scenarios (IE11) you can add an event handler for the error event, so you end up with something like the following to deal with both situations:
The shape of the objects passed in differs slightly, hence the need for two different handlers. In my case one simply repackages the object and hands it off to the other.
Not at all. It's perfectly possible to implement solid error handling. There's even a global handler: https://developer.mozilla.org/en-US/docs/Web/API/GlobalEvent....
For legacy scenarios (IE11) you can add an event handler for the error event, so you end up with something like the following to deal with both situations:
The shape of the objects passed in differs slightly, hence the need for two different handlers. In my case one simply repackages the object and hands it off to the other.