iframe 또는 dialog안의 문서인지 아닌지 구분할때 parent.document == document 를 쓰면 된다. parent.document를 하였을때, parent문서가 존자하지 않으면 자기 자신을 가리키기 때문에... 웹 개발 2019.08.15