---
title: popToRootDocument
framework: tvmljs
role: symbol
role_heading: Instance Method
path: tvmljs/navigationdocument/1627382-poptorootdocument
---

# popToRootDocument

Removes all documents from the stack except for the bottom-most document, which is the root document.

## Declaration

```data
void popToRootDocument();
```

## Discussion

Discussion Use this function to quickly return to the root document from any other document in the stack.

## See Also

### Removing Documents from the Stack

- [clear](tvmljs/navigationdocument/1627312-clear.md)
- [popDocument](tvmljs/navigationdocument/1627397-popdocument.md)
- [popToDocument](tvmljs/navigationdocument/1627420-poptodocument.md)
- [removeDocument](tvmljs/navigationdocument/1627394-removedocument.md)
