How to find the parent window’s DOM from JS code in an iframe
To find the parent window’s DOM from JS code inside an iframe, you need to search the parent.document object.
parent.document.querySelector('what you want');
In the browser’s developer tools, searching the window object works just fine, but if you try to search the DOM that way from within an iframe, you’ll run into an endless string of null search results.
~ End of today’s one-hour rabbit hole ~
20230616
Leave a comment