SyntaxFix
Write A Post
Hire A Developer
Questions
The following line will work: document.location.ancestorOrigins[0] this one returns the ancestor domain name.
document.location.ancestorOrigins[0]