I have a pdftron webviewer and I am trying to access it outside the config.js. This answer suggests to access iframe variables through contentWindow and get hold of readerControl.
But the problem is the iframe created by PDFTron WebViewer has a random id attribute. in order for us to confidently use it, we nee to set the id or class of the iframe to what we know of. I am trying to access the enclosing iframe using the document object which is inside it. I have found the solutions on how to access the other way around.
$(document).parents()
is null
My HTML
<head>
</head>
<body>
<iframe id="random_number">
#document
</iframe>
</body>