Ah, I think I see. Should I be using parent.location.origin?