써먹는 웹개발

[Js] Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://exam.com') does not match the recipient window's origin ('https://www.exam.com') 본문

웹개발/Js & Jquery

[Js] Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://exam.com') does not match the recipient window's origin ('https://www.exam.com')

kmhan 2023. 8. 30. 16:59


728x90
반응형

상황 : 'https://www.exam.com/매핑명' 주소인 팝업화면에서 처리후에 jsp 화면 호출할때 아래 js 소스 실행중 에러발생

 

1. 변경 전

1
2
var url = "https://exam.com:443";
opener.postMessage({msg:'Hello world!'},url);
cs

 

2. 변경 후

1
2
var url = "https://www.exam.com:443";
opener.postMessage({msg:'Hello world!'},url);
cs
728x90
반응형


Comments