My question is simple, suppose i have a html file like this named goal.html:
<html>
.
.
.
<body>
...
<iframe id="main_display" src="../pages/main.html" width=300 height=300><iframe>
.
.
.
and now i wrote a line of javascript in main.html
like window.a ="a"
now my question is how can i get the value of window.a
when i am in goal.html
after searching something and spending some time in google developing tool, i founded something relevant it was iframe.contentWindow
it returns an object but when i try to open(i mean to expand) it, it shows me an error:
Uncaught [object DOMException]
So how do i do this thing?