---
title: popToDocument
framework: tvmljs
role: symbol
role_heading: Instance Method
path: tvmljs/navigationdocument/1627420-poptodocument
---

# popToDocument

Removes all of the documents on the stack that are above the passed document.

## Declaration

```data
void popToDocument(
    in Document document
);
```

## Parameters

- `document`: A DOM document created by parsing a TVML file.

## See Also

### Removing Documents from the Stack

- [clear](tvmljs/navigationdocument/1627312-clear.md)
- [popDocument](tvmljs/navigationdocument/1627397-popdocument.md)
- [popToRootDocument](tvmljs/navigationdocument/1627382-poptorootdocument.md)
- [removeDocument](tvmljs/navigationdocument/1627394-removedocument.md)
