Currently, I am working on a chat widget application script and my goal is to apply styles to the parent document's body from the child document (the chat widget application).
So far, I have attempted to access the parent document using the window object, but it only gives me access to the child document.
https://i.sstatic.net/J3ebA.png
When trying to access the frameElement, it returns null. https://i.sstatic.net/XTVHR.png
I also experimented with accessing the parent document through window.parent
, however, it did not provide access to the parent document -
https://i.sstatic.net/83Ygr.png
Even when attempting to use window.top
, the parent document remains inaccessible.
https://i.sstatic.net/mW82i.png