onerror event Event Object Example Execute JavaScript when an error occurs during the loading of the video's media data: Definition and Usage The onerror event is triggered when an error occurs during the loading of video/audio (audio/video) data. Tip: The related events that affect media data loading are: onabort onemptied onstalled onsuspend Browser support The numbers in the table indicate the version number of the first browser to support the event. Events onerror Yes 9.0 Yes Yes Yes Note: Internet Explorer 11 under Windows 7 does not support the onerror event. Syntax In HTML: < element onerror=" myScript ">In JavaScript: object .onerror=function(){ myScript }; In JavaScript, use the addEventListener() method: object .addEventListener("error", myScript ); Note: Internet Explorer 8 and earlier IE versions do not support addEventListener() method. Technical Details Does it support bubbling: No Is it cancelable: No Event type: Event Supported HTML tags: , Event Object