내가 특정 요구에 대한 내 자신의 "웹 사이트 검사기"를 만들려고 노력하고있어 내가 iframe을 액세스하는 데 문제 'HTMLIFrameElement'에서 'contentDocument'속성을 읽지 못했습니다catch되지 않은 오류 SecurityError는 ..
Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http:// checker.xcore.co.il" from accessing a frame with origin "http:// xcore.co.il". The frame requesting access set "document.domain" to "checker.xcore.co.il", but the frame being accessed did not. Both must set "document.domain" to the same value to allow access.
클래스 CSS에 액세스해야하므로 iFrame을 사용하여이 작업을 수행해야합니다. Click on this link, 웹 사이트를로드 한 다음 오른쪽의에서 "fontSizeErrors"를 클릭하면 콘솔 로그에 오류가 표시됩니다.
어떻게하면 좋을까요 ?? Google에서 도움이되는 것을 찾을 수 없었습니다 ..
고마워!
html 동일한 출처 정책이라고합니다. https://en.wikipedia.org/wiki/Same_origin_policy. http://a.example.com도 http://b.example.com의 데이터에 액세스 할 수 없으므로 보안상의 이유로 문제가 발생합니다. – cforcloud
두 도메인 모두에 액세스 할 수 있고'document.domain'을 설정하여 – charlietfl
iframe이있는 페이지 대신 tampermonkey 또는 greasmonkey를 통해 실제 페이지에서 스크립트를 실행할 수 없다면 무시할 수 없습니다. – dandavis