Back to Content

IntersectionObserverEntry: time property

files/en-us/web/api/intersectionobserverentry/time/index.md

latest950 B
Original Source

{{APIRef("Intersection Observer API")}}

The time read-only property of the {{domxref("IntersectionObserverEntry")}} interface is a {{domxref("DOMHighResTimeStamp")}} that indicates the time at which the intersection change occurred relative to the time at which the document was created.

Value

A {{domxref("DOMHighResTimeStamp")}} which indicates the time at which the {{domxref("IntersectionObserverEntry.target", "target")}} element experienced the intersection change described by the IntersectionObserverEntry. The time is specified in milliseconds since the creation of the containing document.

Examples

See Timing element visibility with the Intersection Observer API for a complete example which uses the time property to track how long elements are visible to the user.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}