The onended property sets and returns the event handler for the ended event.


element.onended = handlerFunction;
var handlerFunction = element.onended;

handlerFunction should be either null or a JavaScript function specifying the handler for the event.


See the DOM event handlers page for information on working with on... handlers.

The ended event is fired when playback has stopped because the end of the media was reached.

See the ended event documentation for more information about the event.


Specification Status Comment
HTML Living Standard
The definition of 'ended' in that specification.
Living Standard  

Document Tags and Contributors

 Contributors to this page: rolfedh, Guillaume-Heras
 Last updated by: rolfedh,