---
title: getActiveDocument
framework: TVMLKit JS
role: symbol
role_heading: Function
platforms: [tvOS 9.0+]
path: tvmljs/1627314-getactivedocument
---

# getActiveDocument

Retrieves the currently active document.

## Declaration

```data
Document getActiveDocument();
```

## Return Value

Return Value The currently active document.

## Discussion

Discussion The currently active document is the document that the user is interacting with. It can be the document on top of the navigation stack or a modally presented document. If the a menu bar document is the top most document, this function returns the document that is selected in the Menu Bar.

## See Also

### Manipulating the Document

- [UUID](tvmljs/1627409-uuid.md)
- [canOpenURL](tvmljs/2123042-canopenurl.md)
- [openURL](tvmljs/1627399-openurl.md)
