gpt4 book ai didi

javascript - 从 Firefox 扩展通知 iFrame 页面?

转载 作者:行者123 更新时间:2023-11-30 06:49:35 37 4
gpt4 key购买 nike

我正在编写 Firefox 扩展,需要将某些事件通知 iFrame 页面。 iFrame 页面包含在由扩展程序创建的侧边栏中,并且此 iFrame 页面由我控制。

当我加载 iFrame 页面时,扩展代码需要发送通知并触发 iFrame 页面内发生的事情。

为此,我从扩展 Javascript 创建一个事件并触发该事件,iFrame 页面正在监听该事件。

不幸的是,当调用 document.createEvent() 时,弹出此错误(复制,带引号,直接从 Firebug 中取出):

Operation is not supported" code: "9

关于错误的任何线索,或关于如何从扩展 Javascript 在 iF​​rame 页面中触发某些内容的建议?

最佳答案

Firebug 有助于调试网页。根据您的描述,问题似乎发生在您的扩展中,因此请根据 the documentation 设置配置文件。并查看错误控制台。

除此之外,远程调试需要查看更多代码:)

关于javascript - 从 Firefox 扩展通知 iFrame 页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2092515/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com