Looked around extensively and couldn't find anything related so apologies if this is a copy.
How'd you go about accessing the html elements outside the #document areas in an environment like so: Example here, Where you have a new environment set up within another. Is it even possible? I'm having this issue as my js code runs within a '#document' but I'm trying to edit html outside it with no way of just removing the #document.
Additional info for use case: I'm trying to edit wider html code on my google sites webpage but only have a "embed code" option which runs in it's own iframe and #document. Happy to clarify anything :) !
First of all, welcome to Stackoverflow.com.
Well you can't, changing elements outside an iFrame isn't possible. However I know that when you using like Google TagManager there are some possibilities to change HTML and CSS but only if the code is on the parent website, so not inside the iFrame.
Hopefully this is an answer that helps you.