The EDIT / the UPDATE: . Although you can get the domain name of the parent iframe, I did not want to delete this answer, as there is some useful information for understanding the same domain policy in terms of access to the DOM. Soumya92's answer proves that an iframe in one domain can indeed get the domain of the parent domain.
However, other DOM access information is still retained.
, , , - , document.domain. .
, foo.example.com bar.example.com DOM, HTML document.domain :
// allow foo.example.com and bar.example.com to communicate
document.domain = "example.com";
, www.foo.com , www.bar.com, , iframe top.window.
, iframe , , , , .
, - , .