Please describe your issue and provide steps to reproduce it:
Each time you load a new document, PDFTron removes all children from the container that contains the rendered document (set by documentViewer.setViewerElement(viewerElement)).
Therefore, you have to add custom elements manually every time after loading new documents.
So there is no WebViewer instance. I like do use PDFTron without the iFrame and build my own UI.
In the DIV element that is used for documentViewer.setViewerElement() I have a popup component for selected annotations. All good until I load a new document. When you inspect the DOM you will see, that loadDocument() deletes all children from the div that is used by setViewerElement().
The method loadDocument is designed to unload old document and render the new one, so the content within the viewer document will be wiped.
If you want to create custom popup component, you may have to create it outside of the viewer div. You can convert the coordinates between the viewer and PDF to append the popup to the right place in the viewer. Please check the guide: PDFTron Systems Inc. | Documentation