This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

detail

Summary

Retrieves additional information about an event.

Property of dom/CustomEventdom/CustomEvent

Syntax

Note: This property is read-only.

var eventDetails = event.detail;

Return Value

Returns an object of type

The content of this property is user-defined. It can be an integer, date, array, or other object type.

Examples

function getCustomEventDetail(e) {
//retrieve detail for custom event
var customEventDetail = e.detail;
return customEventDetail;
}

Usage

 Use this property to retrieve any available additional information about this developer-generated custom event. Note: It may be empty.

Related specifications

DOM Level 3 Events
Working Draft

Attributions