打开URL时出现postMessage错误

时间:2015-08-03 10:50:24

标签: javascript google-chrome cross-domain

我通过致电window.open()

打开a link

然后我在Google Chrome中收到以下错误:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://editorial.outbrain.com') does not match the recipient window's origin ('https://example.com').

导致此错误发生的原因是什么,我该如何解决?

您可以访问this JSFiddle重新创建此错误(您必须启用弹出式窗口)。

0 个答案:

没有答案