I'm trying to access the contents contained in a nested document which is deep inside the html. I've just located the selector using document.getElementsByClassName('top')
However I noticed it is recieving a nested document from the src
url.
I need to some how query the document in the same console, for a couple reasons. Firstly because the url version of the document doesn't actually contain all the contents of the document, and secondly because I haven't be able to communicate between two separate page consoles.
Here are the inner contents of the document, standard header and body tags.
I also tried to access the document like so with no luck (not too surprised)
document.getElementsByClassName('top').querySelector('#document')
The only option I found was to enter the document by returning the url
document.getElementsByClassName('top').src
And opening in a new tab. But of course I can't proceed further with this method.