---
title: "DocumentTimeline | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface DocumentTimeline

The **`DocumentTimeline`** interface of the Web Animations API represents animation timelines, including the default document timeline (accessed via Document.timeline).

[MDN Reference](https://developer.mozilla.org/docs/Web/API/DocumentTimeline)

interface DocumentTimeline {  
    [currentTime](#currenttime): [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/) | null;  
    [duration](#duration): [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/) | null;  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.DocumentTimeline))

-   [AnimationTimeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.AnimationTimeline/)
    -   DocumentTimeline

##### Index

### Properties[](#properties)

[currentTime](#currenttime) [duration](#duration)

## Properties[](#properties-1)

### `Readonly`currentTime[](#currenttime)

currentTime: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/) | null

The **`currentTime`** read-only property of the Web Animations API's AnimationTimeline interface returns the timeline's current time in milliseconds, or null if the timeline is inactive.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationTimeline/currentTime)

Inherited from [AnimationTimeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.AnimationTimeline/).[currentTime](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.AnimationTimeline/#currenttime)

### `Readonly`duration[](#duration)

duration: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/) | null

The **`duration`** read-only property of the Web Animations API's AnimationTimeline interface returns the maximum value for this timeline or null.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationTimeline/duration)

Inherited from [AnimationTimeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.AnimationTimeline/).[duration](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.AnimationTimeline/#duration)
