--- title: GlobalEventHandlers.onended slug: Web/API/GlobalEventHandlers/onended translation_of: Web/API/GlobalEventHandlers/onended ---
The onended
property of the {{domxref("GlobalEventHandlers")}} mixin is the {{event("Event_handlers", "event handler")}} for processing {{event("ended")}} events.
The ended
event is fired when playback has stopped because the end of the media was reached.
element.onended = handlerFunction; var handlerFunction = element.onended;
handlerFunction
可以为 null
或者具体的事件响应函数。
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG','#handler-onended','onended')}} | {{Spec2('HTML WHATWG')}} |
{{Compat("api.GlobalEventHandlers.onended")}}