Add onerror handling for img/video loading.

How did you test that the onerror callback works?