Name

Image.onerror: event handler invoked when an error occurs during image loading — DOM Level 2 Events

Synopsis

Function onerror

Description

The onerror property of an Image object specifies an event-handler function that is invoked when an error occurs during the loading of an image. See also Window.onerror.

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.