I have a custom module that is displaying a twig template with an iframe inside it:
There is JS file also being loaded and when I load the page while I'm logged in as an admin, the iframe shows up fine and everything works. However, when I check the page in an incognito window, the frame doesn't show up and I see these errors in the console:
And the JS file I'm loading does not have 'innerHTML' property. Here is my JS file:
I thought it could've been some type of permission issue but the page still loads for anonymous users, just not the iframe.