【发布时间】:2011-03-17 14:11:09
【问题描述】:
我想使用 Chrome 开发者控制台查看我的应用程序中的变量和 DOM 元素,但该应用程序存在于 iframe 中(因为它是一个 OpenSocial 应用程序)。
所以情况是:
<containing site>
<iframe id='foo' src='different domain'>
... my app ...
</iframe>
</containing site>
有没有办法从开发者控制台访问iframe 中发生的事情?如果我尝试做document.getElementById("foo").something,它不起作用,可能是因为iframe 在不同的域中。
我无法在新选项卡中打开 iframe 内容,因为 iframe 还需要能够与包含站点通信。
【问题讨论】:
标签: debugging iframe google-chrome