iframe의 sandbox 속성을 이용해서 XSS 공격 등을 막을 수 있다.

http://www.tcpschool.com/html-tag-attrs/iframe-sandbox

MDN 에 따르면 allow-scriptsallow-same-origin 을 함께 사용하는 것을 권장하지 않는다.