timeStamp Event Attribute

Definition and Usage

The timeStamp event attribute returns the milliseconds from the completion of the document to the creation of the specific event.

Not all systems provide this information, so timeStamp may not be applicable to all systems/events.

Example

Get the milliseconds after the document is loaded:

var n = event.timeStamp;

Try It Yourself

Syntax

event.timeStamp

Technical Details

Return Value: A numeric value representing the number of milliseconds from the document loading to the event creation.
DOM Version: DOM Level 2 Events

Browser Support

The numbers in the table indicate the first browser version that fully supports this property.

Properties Chrome IE Firefox Safari Opera
timeStamp Support 9.0 Support Support Support