无法在“DOMWindow”上执行“postMessage”:提供的目标来源与收件人窗口的起始位置不匹配(“null”) [英] Failed to execute 'postMessage' on 'DOMWindow': The target origin provided does not match the recipient window's origin ('null')

查看:4788
本文介绍了无法在“DOMWindow”上执行“postMessage”:提供的目标来源与收件人窗口的起始位置不匹配(“null”)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个英雄游戏,现在我试图让它在Facebook画布上工作,但是,虽然它在Firefox中的工作,但在Chrome和IE中却没有。

I have a game in heroku, now I'm trying to make it work in Facebook canvas, but, while it works in Firefox, in Chrome and IE doesn't.

IE显示一个带有按钮的警告,当点击按钮时,它显示内容。

IE shows a warning with a button, when clicking the button, it shows the content.

在chrome中,我收到此错误:

In chrome, I get this error:

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

有什么问题?

推荐答案

确保您/ FB的目标窗口发布消息已加载。大部分时间我得到这个错误是当一个隐藏的iframe发送消息无法加载。

Make sure the target window you're/FB is posting message is loaded. Most of the time I got this error was when a hidden iframe I was sending messages to failed to load.

这篇关于无法在“DOMWindow”上执行“postMessage”:提供的目标来源与收件人窗口的起始位置不匹配(“null”)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆