--- title: GlobalEventHandlers.onloadedmetadata slug: Web/API/GlobalEventHandlers/onloadedmetadata translation_of: Web/API/GlobalEventHandlers/onloadedmetadata ---
{{ ApiRef("HTML DOM") }}

The onloadedmetadata property of the {{domxref("GlobalEventHandlers")}} mixin is the {{domxref("EventHandler")}} for processing {{event("loadedmetadata")}} events.

The loadedmetadata event is fired when the metadata has been loaded.

Syntax

element.onloadedmetadata = handlerFunction;
var handlerFunction = element.onloadedmetadata;

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

Specification

Specification Status Comment
{{SpecName('HTML WHATWG','#handler-onloadedmetadata','onloadedmetadata')}} {{Spec2('HTML WHATWG')}}

Browser compatibility

{{Compat("api.GlobalEventHandlers.onloadedmetadata")}}

See also