element.onended = handlerFunction; var handlerFunction = element.onended;
handlerFunction should be either
See the DOM event handlers page for information on working with
ended event is fired when playback has stopped because the end of the media was reached.
ended event documentation for more information about the event.
|WHATWG HTML Living Standard
The definition of '